밍쯔와 안작고 안귀여운 에러들🖤
[Android] fragment의 button에 backgroundColor 및 textSize 등 적용안되는 오류 본문
[Android] fragment의 button에 backgroundColor 및 textSize 등 적용안되는 오류
밍쯔 2022. 7. 15. 11:39style=Apptheme 으로 "Theme.MaterialComponents.Light.NoActionBar"을 사용하고 있음에도
왜인지,,,, activity에서는 button으로 잘 적용되던 drawable들이 fragment에서 적용이 안된다•••
fragment에서 동적으로 바인딩해서 설정해봐도 적용이 안되더랍니다,,하하 왜이러냐 싶어서
확인해보니 naver Map을 보여주는 fragment 설정이 "Theme.AppCompat.Light.NoActionBar"로 되어 있어서 그런것,, 같다,,! 아마,,,!
그래서xml에서 button을 "androidx.appcompat.widget.AppCompatButton" 으로 바꿔주니 해결 !_!
[참고]
https://developer.android.com/reference/androidx/appcompat/widget/AppCompatButton
AppCompatButton | Android Developers
androidx.wear.watchface.complications.rendering
developer.android.com
https://stackoverflow.com/questions/31858374/android-button-background-color-not-changing
Android Button background color not changing
In this android project im creating a default button style. my styles.xml <!-- Base application theme. --> <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar"> <item
stackoverflow.com
Difference between an AppCompat view and a normal Android view
What is the difference between an AppCompat view component and a standard/default view component? For example, the difference between an AppCompatEditText, and an EditText, or between an AppCompat...
stackoverflow.com
Can't change button's background color in XML .Android studio
I created TableLayout then buttons. The button's color was automatically set purple. So I can't change them right now. It's my first time here.
stackoverflow.com
'Develop > Android | iOS' 카테고리의 다른 글
[Android/Java] 스켈레톤 UI 자료 조사 (0) | 2022.08.02 |
---|---|
[Android/Kotlin] 언어 변경 (0) | 2022.07.18 |
OnErrorNotImplementedException: The exception was not handled due to missing onError handler in the subscribe() method call,,,였던것,,,, (0) | 2022.07.14 |
[Android] 전화번호부 목록 가져오기 (0) | 2022.07.14 |
[Android/Java] RecyclerView의 item 드래그앤드롭(drag&drop) + (swpie&dismiss) (0) | 2022.06.23 |