0

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. Im 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?

saintPeter
  • 203
  • 4
  • 14

1 Answers1

0

so, cause this was due to glitchy android itself, I desided to move functionality to the menu for lower apks.

saintPeter
  • 203
  • 4
  • 14