Open
Conversation
skdud0629
reviewed
Feb 21, 2025
| private fun loadMoreResults() { | ||
| if (pQuery.isNullOrEmpty()) return | ||
| Loading = true // 로딩 시작 | ||
| runOnUiThread { binding.progressBar.visibility = View.VISIBLE } |
| } | ||
| } catch (e: Exception) { | ||
| // 오류나면 모두 멈춤 | ||
| e.printStackTrace() |
There was a problem hiding this comment.
ui 스레드에서 예외 처리를 하면 앱이 터질 가능성이 있지 않을까요?
|
|
||
| fun updateData(newList: List<GithubData>) { | ||
| repoList = newList | ||
| notifyDataSetChanged() |
There was a problem hiding this comment.
diffutill을 사용하신다면 notifyDataSetChanged 을 호출할 필요가 없어서 효율적이에요! notifyDataSetChanged는 비용이 많이 드는 작업입니당
| val description = item.optString("description", "No description") | ||
| val stars = item.getInt("stargazers_count") | ||
| val forks = item.getInt("forks_count") | ||
| val url = item.getString("html_url") |
There was a problem hiding this comment.
JSON을 직접 파싱하지 말고 Retrofit + Gson을 써주세요!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
검색어로 리포지토리 불러오기(30개)
아래로 스크롤시 로딩바 생성 및 추가 리포지토리(30개) 불러오기
리포지토리 클릭시 git url로 이동