-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
테마 변경 기능 추가 #163
테마 변경 기능 추가 #163
Conversation
android/app/src/main/java/app/priceguard/ui/home/mypage/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/app/priceguard/ui/home/mypage/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/app/priceguard/ui/home/mypage/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/app/priceguard/ui/home/mypage/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
스플래시 스크린이 시스템 설정 테마에만 따라가는 이슈가 있음
스플래시 스크린에도 테마를 적용하고 싶으면, setApplicationNightMode을 사용해보시겠어요?
대신 SplashScreen Activity에서 SDK 31로 분기하는 부분에서 따로 분기를 해주어야할 수도 있습니다. (31 밑인 경우에는 기존과 같이 AppCompatDelegate
사용)
android/app/src/main/java/app/priceguard/ui/splash/SplashScreenActivity.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
android/app/src/main/java/app/priceguard/ui/home/mypage/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/app/priceguard/ui/home/mypage/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/app/priceguard/ui/splash/SplashScreenActivity.kt
Outdated
Show resolved
Hide resolved
android/app/src/main/java/app/priceguard/ui/splash/SplashScreenActivity.kt
Outdated
Show resolved
Hide resolved
…nd09-PriceGuard into feat/and/theme
android/app/src/main/java/app/priceguard/ui/home/theme/ThemeDialogFragment.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
수고하셨습니다!
진행 내용
스크린샷 (선택)
Screen_Recording_20231204_201646_PriceGuard.mp4
문제 및 해결과정
라디오버튼 체인지 리스너에 테마 변경 코드를 작성하였는데 화면이 깜빡이는 듯한 증상이 발생하였다.
알고 보니, 테마가 변경될 때 액티비티, 프래그먼트가 재생성이 되는데 이때 다이얼로그 프래그먼트가 재생성 될 때 체인지 리스너가 한번 더 호출되면서 테마 변경 코드가 다시 실행되어 깜빡이는 것 처럼 무한 테마 변경의 늪에 빠져버리게 된다..
-> 확인 버튼 누를 시 테마 변경하는 것으로 변경함
Application onCreate()에 테마 변경, splash activity의 onCreate()의 setContentView()이전에 테마 변경 시도해봤지만 splash화면은 적용이 되지 않음...