Navigation Drawer item background colour for selected item

后端 未结 13 1507
独厮守ぢ
独厮守ぢ 2020-11-28 23:54

I used Android Studio to implement the Navigation Drawer and I can\'t get the blue colour that is used to show which section we\'re currently in to change.

I\'ve tri

13条回答
  •  粉色の甜心
    2020-11-29 00:13

    Still not sure why it is that it doesn't work. But the way I found around it is to use my own simple_list_item_activated layout to be passed to the ArrayAdapter which was basically the same except for setting the text colour to white. I then replaced getActionBar().getThemedContext() with getActivity().getBaseContext() and it now has an effect.

    This may not be the correct way and may have repercussions in the future, but for now I have it working the way I want it to.

提交回复
热议问题