We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Just like material bottom navigation bar I want to achieve something like: When icon selected : filled icon When icon not selected : Outlined icon
IN PLACE OF MENU ITEMS ICON I'M USING BELOW XML FILE :
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/homeoutline" android:state_checked="false"/> <item android:drawable="@drawable/homefilled" android:state_checked="true"/> </selector>
But this is not working I'm getting outlined icon every time whether icon selected or not selected. Please help.
The text was updated successfully, but these errors were encountered:
Just like material bottom navigation bar I want to achieve something like: When icon selected : filled icon When icon not selected : Outlined icon IN PLACE OF MENU ITEMS ICON I'M USING BELOW XML FILE : <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/homeoutline" android:state_checked="false"/> <item android:drawable="@drawable/homefilled" android:state_checked="true"/> </selector> But this is not working I'm getting outlined icon every time whether icon selected or not selected. Please help.
try android:state_selected not android:state_checked
android:state_selected
android:state_checked
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/homeoutline" android:state_selected="false"/> <item android:drawable="@drawable/homefilled" android:state_selected="true"/> </selector>
Sorry, something went wrong.
No branches or pull requests
Just like material bottom navigation bar I want to achieve something like:
When icon selected : filled icon
When icon not selected : Outlined icon
IN PLACE OF MENU ITEMS ICON I'M USING BELOW XML FILE :
But this is not working I'm getting outlined icon every time whether icon selected or not selected. Please help.
The text was updated successfully, but these errors were encountered: