material-components / material-components/material-components-android
[Navigation Bar] Change Icon Using Selector Drawable
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 3.2k
- PR merge metrics
- No merged PRs in 30d
Description
**Description:** Selector drawable throwing resource not found exception.
**Expected behavior:** Based on selector drawable state menu icon should be change on the navigation bar
**Source code:** The code snippet which is causing this issue
**Minimal sample app repro:**
Selector item:
`
`
Navigation menu:
`
----More menu options-------------
`
in MainActivity XML:
`
`
**Android API version:** 33
**Material Library version:** 1.11.0-alpha01
**Device:** Pixel 4a
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the selector drawable and bottom navigation menu XML shown in the report, then reproduce the resource-not-found exception using BottomNavigationView on Android API 33 with Material 1.11.0-alpha01. Trace how the navigation item icon is loaded and state changes are handled. Done means the selector-based icon loads and changes correctly for checked and unchecked states without an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100