React-native-picker-select: [Android] Visual problem in Honor Lite 9 when I use background in xml

Created on 3 Sep 2019  路  2Comments  路  Source: lawnstarter/react-native-picker-select

I know that this library is only JS but I want to know if someone had the same problem and which is the solution.

I created a custom style for spinner dropdown, but I have a visual problem with Honor Lite 9.

Honor Lite 9

I test in Samsung A8 (8.0), Xiaomi Redmi Note 3 (6.0), Samsung A50 (9.0), Moto E3 (8.0) and different simulators and dropdown is ok.

Others devices

Can I resolve this problem without java code? ( I'm using react-native ) Thanks!

This is my code:

styles.xml

<resources>
    <!-- Base application theme. -->
    <style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:windowBackground">@drawable/launch_screen</item>
        <!-- Associate picker theme -->
        <item name="android:spinnerDropDownItemStyle">@style/SpinnerDropDownItem</item>
    </style>
    <!-- Picker Item -->
    <style name="SpinnerDropDownItem" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="android:paddingLeft">15dp</item>
        <item name="android:paddingRight">15dp</item>
        <item name="android:textColor">@color/white</item>
        <item name="android:fontFamily">@font/muli_regular</item>
        <item name="android:gravity">center</item>
        <item name="android:background">@drawable/picker_divider</item>
    </style>
</resources>

picker_divider.xml

<shape xmlns:android="http://schemas.android.com/apk/res/android"
    android:shape="rectangle">
    <solid android:color="@color/dark" />
    <corners android:radius="0.5dp" />
    <stroke
        android:color="#363633"
        android:width="0.1dp" />
</shape>

Most helpful comment

All 2 comments

this question would be more appropriate for stack overflow - it's also tied to native apis and not necessarily this library

Was this page helpful?
0 / 5 - 0 ratings

Related issues

karajaNaji picture karajaNaji  路  3Comments

Fleuv picture Fleuv  路  8Comments

ltsharma picture ltsharma  路  3Comments

Unforgiven-wanda picture Unforgiven-wanda  路  4Comments

Hristijan95 picture Hristijan95  路  4Comments