Android
[Android] NumberPicker 글씨 색상이 연하게 보이는 이슈 해결
박매트
2024. 2. 19. 01:20
자꾸 numberpicker을 dialog를 통해서 보여주는데, 연하게 색상이 보이는 이슈가 생겼다...
우연치 않게 youtube 영상을 봄..
계속 몇일 내내 뭐가 잘못되었나. 싶었는데.. 설정을 덜 해준건지 바뀐건지
원래 글자 색깔은 검정색이 기본인데 왜 자꾸 연하게 뜬 건지는 잘 모르겠다 ㅠ
https://www.youtube.com/watch?v=JrZvHS4WxaY
<style name="NumberPickerStyle" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:textSize">20sp</item>
<item name="android:textColorPrimary">@android:color/black</item>
<item name="android:fontFamily">@font/pretendard_semibold</item>
</style>
<NumberPicker
android:id="@+id/picker_year"
android:layout_width="wrap_content"
android:layout_height="150dp"
android:layout_margin="10dp"
android:theme="@style/NumberPickerStyle"
android:alpha = "1.0"
android:selectionDividerHeight="0dp"
>
</NumberPicker>
이런식으로 설정해주면 된다 !
parent="Theme.AppCompat.Light.NoActionBar"
이걸 넣어서 드디어 검정색으로 보이게 시작했다...
font도 style에서 지정해줬더니 바뀌었다 !