아래 사진처럼 custom appbar를 추가하엿는데도 백그라운드 color 가 비쳐서 나오는 문제가 발생하였다
custom Actionbar 의 Solid.Inverse 를 상속받아서
appbartheme 에 넣어주면 완성!
👇 추가 style
<!-- custom ActionBar -->
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">#FFFFFF</item>
</style>
👇 내가 사용하는 theme
<style name="Theme.GooduckRefactoring" parent="Theme.MaterialComponents.DayNight.DarkActionBar">
<item name="actionBarTheme">@style/MyActionBar</item>
</style>
아! 그리고 위에 status bar 과 white 라서 시간과 여러 아이콘들이 안나오는 문제는
기존 Style 에 아래 요소를 추가 하면 나오게된다
<item name="android:windowLightStatusBar">true</item>
완성
반응형
'개발 > Android' 카테고리의 다른 글
[Android] Android API Level (0) | 2023.01.10 |
---|---|
[Android] Keypad 올리기 & 내리기 (0) | 2022.09.13 |
[Android] TMAP POI 사용기2 (0) | 2022.08.24 |
[Android] Google Map Key 오류 (0) | 2022.08.21 |
[Android] 외부에 공유하기 (0) | 2022.08.19 |
댓글