I have a simple counter and I would like to change the background color of the popup. However, when I try to install it using " android: popupBackground " in xml or setPopupBackgroundResource () in the code, I got a strange looking counter, as shown below

If I do not set the background color of the popup or , use the theme of the preliminary material , everything is fine. Does anyone know what is wrong?
layout
<?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" android:background="@android:color/holo_blue_dark" android:gravity="top|center" android:orientation="vertical" > <Spinner android:id="@+id/spinner_toolbar" android:layout_width="wrap_content" android:layout_height="wrap_content" <!-- ======= ERROR HERE =========== --> android:popupBackground="#FFFFFF" android:spinnerMode="dropdown" /> </LinearLayout>
activity
public class TestClass extends Activity { @Override public void onCreate(Bundle b) { super.onCreate(b); setContentView(R.layout.test_layout);
style
<style name="AppBaseTheme" parent="@android:style/Theme.Material.Light.DarkActionBar"> </style>
source share