Spinner popup background color issue

前端 未结 2 1696
故里飘歌
故里飘歌 2021-01-01 06:05

The following code produces an issue (see attached images) on Asus Intel Zenfone. Every other device I tested on is showing it fine, meaning the black area around the

相关标签:
2条回答
  • 2021-01-01 06:59

    I faced this issues, Simple, You only add a attribute as followings:

    android:popupElevation="0dp"
    
    0 讨论(0)
  • 2021-01-01 07:01

    I face the same problem,finally i got solution.You need to create one xml file in drawable folder.

    <?xml version="1.0" encoding="utf-8"?>
    <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle" >
        <corners android:radius="2dp" />
        <solid android:color="#606d73" />
    </shape>
    

    and then apply it to the spinner:

    <Spinner
     android:id="@+id/from_spinner"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:background="@drawable/refine_drpdn_right"
     android:drawSelectorOnTop="true"
     android:popupBackground="@drawable/spinner_popup_background"
     android:spinnerMode="dropdown" />
    
    0 讨论(0)
提交回复
热议问题