How to implement navigation drawer selector similar to Google Play Music
- by Shivam Bhalla
I am looking to implement a navigation drawer selector which shows the currently selected item at all times when the drawer is opened and that is retained even when the drawer is closed. Something like this:
I have used something like this but it only shows the selector when I click on the list item. This is in my res folder:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/list_activated_holo" />
</selector>
How do i attain the above shown implementation?Which state do i need to implement? Thanks