반응형

Platform/Android 124

[RecyclerView] setHasStableIds(boolean hasStableIds)

ISSUE //FIXME. [BUG] 아이템 4개만 반복해서 나옴 > 원인: 해당 콜백이 4번만 불린다. // 그 다음 스크롤 시 나오는 아이템들은 해당 콜백이 호출되지 않고, 기존에 있던 정보를 재활용한다. // 생각한 해결방안 // -> 스크롤 할 때 마다, 해당 함수가 호출되게 한다. && 문제요구사항인 스크롤할 때마다 20개의 데이터를 호출하는 것도 추가해야 됨 ! // 실제 해결방안 // -> setHasStableIds(true) 설정을 주석처리 해주니 해결!! // -> 왜일까??? /** * Indicates whether each item in the data set can be represented with a unique identifier * of type {@link java.la..

Platform/Android 2022.11.02

[RecyclerView] onBindViewHolder 호출 시점

0. Marvel 캐릭터를 보여주는 앱을 만들고 있던 도중.. API 호출 시에는 데이터가 20개 정도 오는 데, RecyclerView 에는 4개의 아이템만 반복되어 보이는 버그가 있었다. 원인은 onBindViewHolder 가 4번만 호출되고, 이후 스크롤 시에는 호출되지 않아, 기존에 있던 4개의 아이템만 반복해서 보여지게 되었다. 이번 기회에 RecyclerView 에 대해 좀 더 자세히 알아보고 싶어서 공부한 내용을 정리해 보려고 한다. 1.

Platform/Android 2022.10.17

[ERROR][Retrofit] CLEARTEXT communication to gateway.marvel.com not permitted by network security policy

2022-09-12 14:54:42.941 30296-30296/kr.co.ganeg.introducemarvelapp E/CharacterListRepository: onFailure: error. cause: CLEARTEXT communication to gateway.marvel.com not permitted by network security policy 해결 AndroidManifest.xml → 내 usesCleartextTraffic="true" 설정 참고 https://gun0912.tistory.com/80 [안드로이드]CLEARTEXT communication to XXXX not permitted by network security policy "CLEARTEXT communica..

Platform/Android 2022.09.12

[ERROR] Invocation failed Unexpected end of file from server 오류 (GitHub Push 오류)

https://latte-is-horse.tistory.com/353 [Android Studio] Invocation failed Unexpected end of file from server 오류 (GitHub Push 오류) 문제 상황 GitHub에 Push를 시도하던 중 다음과 같은 오류 발생. 토큰을 재발급 받아 갱신시켜 봤지만 해결 안 됨 Invocation failed Unexpected end of file from server java.lang.RuntimeException: Invocatio.. latte-is-horse.tistory.com

Platform/Android 2022.07.24
반응형