1

I´m working over ICS 4.0.3 so I'm using AppCompatSpinner.

The spinner is fine, looks like lollipop's spinner.

enter image description here

But when I click in any item, just before it closes, it goes totally blank for half second at least. Enough to notice the "blank effect".

enter image description here

I don't know why that happens and what to do to fix it. I'm not using a custom XML layout spinner, just a default one, you know:

AppCompatSpinner spinner = new AppCompatSpinner(getActivity());

Can someone help me?

Hector
  • 129
  • 16
  • Post your `styles.xml` file – Mohammed Aouf Zouag Dec 03 '15 at 10:45
  • is this spinner inside ToolBar? or at least ActionBar ? .... if so use different context: `getActivity().getSupportActionBar().getThemedContext()` ... also use this context for creating the Adapter ... in fact it is not "blank" but it is similar to French war flag: "white cross on white background" – Selvin Dec 03 '15 at 10:51
  • The only style I'm using for the moment only defines custom colors. BUT his parent is a style from a design library. – Hector Dec 03 '15 at 11:19
  • And yes, I'm using a Toolbar. I tried the other context and I used ((AppCompatActivity) getActivity()).getSupportActionBar().getThemedContext() and it changed... now the background is black. – Hector Dec 03 '15 at 11:22
  • @Hector *now the background is black* but the text is visible? the it's working ... I think is a default implementation(on older API) ... now did you set `app:popupTheme` in Toolbar? ... I fix it by createing new theme from `ThemeOverlay.AppCompat.Dark.ActionBar` with item: `android:colorBackground=@color/colorPrimaryDark` ... and then set such style for `app:popupTheme` and `app:theme` of the Toolbar ... – Selvin Dec 04 '15 at 16:33
  • Please check [this answer](http://stackoverflow.com/a/36005643/2826147). – Amit Vaghela Mar 15 '16 at 08:13

0 Answers0