Im using last AS and testing on a real device with sdk 15. Using usual appcompat behavior to set action bars. For one activity I need to set a spinner to have filter on it. I
m doing this like this.
((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayShowHomeEnabled(false);
((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayShowCustomEnabled(true);
((AppCompatActivity) getActivity()).getSupportActionBar().setDisplayShowTitleEnabled(false);
ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(getActivity(),
R.array.guestsFilter, R.layout.spinner_filter);
adapter.setDropDownViewResource(R.layout.spinner_drop_list);
Spinner mFilterSpinner = new Spinner(((AppCompatActivity) getActivity()).getSupportActionBar().getThemedContext());
mFilterSpinner.setAdapter(adapter);
((AppCompatActivity) getActivity()).getSupportActionBar().setCustomView(mFilterSpinner);
All works great on 23 sdk emulator, but not on real device with 15 sdk. The problem is that triangle drawable near the drop down. It`s of dark color. I thought it should work due to back compatibility. Any advice though?