본문 바로가기

안드로이드16

[android] 데이터 모델 난독화 오류, proguard-rule 안드로이드 스튜디오 업데이트를 하고나니 데이터 모델 난독화 과정에서 문제가 생겼다. 1. preference에 저장된 데이터를 가져오지 못한다. 2. 릴리즈 버전으로 프로가드 적용시에만 발생한다. 결론은 난독화 문제로 판단이 되었고 아래 룰을 추가하여 해결하였다. -keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken -keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken 2024. 2. 28.
[android] TextView 줄바꿈2 - justificationMode TextView에서 양끝 정렬을 활용하기위해 justificationMode 사용했지만 어절간 간격이 너무 벌어지는 현상이 종종 발견되어 사용하기 어려웠다. 해결방법으로 좋은 커스텀뷰를 찾아 기록 및 공유하고자 글을 남긴다. https://stackoverflow.com/questions/57139782/how-to-fix-cutoff-big-text-when-i-using-custom-textview-to-justify-text 2024. 1. 17.
[playstore] 앱 사용자 확인하기 (통계) 콘솔에서 통계를 들어가면 확인할 수 있다. 2024. 1. 12.
[andorid] TextView 줄바꿈 변경 (Activity 전체) TextView는 개행 기준이 어절이여서 음절로 바꾸기 위해 replace(" ", "\u00A0")가 필요하다. Activity내에 모든 TextView를 바꾸기 위해선 rootView를 돌려서 찾아주면 끝. try { viewDataBinding.run { (root as ViewGroup).allViews.forEach { if (it is TextView) { it.text = it.text.toString().replace(" ", "\u00A0") } } } } catch (e: Exception) { e.printStackTrace() } 2023. 12. 13.