Custom Navigation Icon not visible Material Toolbar Android

508 Views Asked by At

I am using Material Design Components, each fragment in my app has a seperate Toolbar Fragment Owned Toolbar

I am having issue setting the custom drawable as the navitaion icon using xml attribute. In the Material.io docs they mention a xml attribute to set the custom navitaion icon. Navigation Icon is not visible on the screen? what did I miss?

xml attribute mentioned in docs

app:navigationIcon="@customDrawable"

Reference Image from Material.io Appbar Docs

Material Toolbar Docs Reference Image

My fragment_home.xml

   <com.google.android.material.appbar.AppBarLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content">

            <com.google.android.material.appbar.MaterialToolbar
                android:id="@+id/toolbar"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:navigationIcon="@drawable/ic_menu"
                app:title="@null" />
        </com.google.android.material.appbar.AppBarLayout>

Navigation Icon Not Visible

Mobile Screenshot

0

There are 0 best solutions below