Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

111
Views
How to change bottom navigation icons on selection

How to change bottom navigation icons on selection and unselection This was my previous code

bottomBar.getBar().setBackgroundColor(getResources().getColor(R.color.bottom_tabs));
bottomBar.setActiveTabColor("#FFFFFE");
over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

First you have to make drawable selectable in your drawable folder

<?xml version="1.0" encoding="utf-8"?>
<selector
    xmlns:android="http://schemas.android.com/apk/res/android">
    <item android:state_selected="true" android:drawable="@drawable/selected_icon"/>
    <item android:state_selected="false" android:drawable="@drawable/unselected_icon" />
    <item android:drawable="@drawable/unselected_icon" />
</selector>

In the bottom navigation menu place this selectable drawable as icon

<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android">
    <item
        android:id="@+id/itemId"
        android:icon="@drawable/drawable_selectable_name"
        android:title="@string/title"/>
</menu>

In activity or fragment where you have used bottom navigation use the following line

bottomNavigationView.itemIconTintList = null
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!