MaterialNumberPicker
MaterialNumberPicker copied to clipboard
Separator color always black
Not sure if it's onli API29, but that's my target. Separator color is always black no matter what color I set it, however, it appears right on the layout editor - just not on the actual build. I'm setting color in xml.
I reproduced it at sample project just by modyfing activity_main.xml quickly:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_margin="30dp"
android:gravity="center"
android:orientation="vertical">
<Button
android:id="@+id/default_number_picker_button"
style="@style/Button"
android:text="@string/alert_default_title" />
<Button
android:id="@+id/simple_number_picker_button"
style="@style/Button"
android:layout_marginTop="16dp"
android:text="@string/alert_simple_title" />
<Button
android:id="@+id/custom_number_picker_button"
style="@style/Button"
android:layout_marginTop="16dp"
android:text="@string/alert_custom_title" />
<com.github.stephenvinouze.materialnumberpickercore.MaterialNumberPicker
android:layout_width="70dp"
android:layout_height="wrap_content"
app:mnpSeparatorColor="@android:color/holo_orange_dark"
app:mnpTextSize="17dp" />
</LinearLayout>
Did further investigation and looks like it's related to one of these, which are newer in mine:
- ANDROID_BUILD_SDK_VERSION=29
- distributionUrl=https://services.gradle.org/distributions/gradle-6.5-bin.zip
- implementation 'androidx.appcompat:appcompat:1.2.0'
I also head same problem, when used picker in XML on android API 33.
Solution to get around this problem: https://stackoverflow.com/questions/44517686/android-how-to-remove-divider-lines-in-number-picker