Navigation Drawer item background colour for selected item

后端 未结 13 1505
独厮守ぢ
独厮守ぢ 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:36

    I usually use my custom adapter that has an int selection field, and a setSelection(int) function. And in the getView function I set the background of the view according to position == selection.

提交回复
热议问题