I am implementing navigation view and its has header view how to hide the image view dynamically
Below is my code
<android.support.design.widget.NavigationView
android:id="@+id/navigation_view"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/drawer_header"
app:menu="@menu/drawer" />
drawer_header.xml
<?xml version="1.0" encoding="utf-8"?>
<ImageView
android:id="@+id/drawer_logo_icon"
android:layout_width="150dp"
android:layout_height="0px"
android:layout_gravity="center"
android:layout_marginTop="10dp"
android:layout_weight="2"
android:background="@drawable/logo_white" />
<TextView
android:id="@+id/drawer_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="@style/TextAppearance.AppCompat.Body1" />
<TextView
android:id="@+id/drawer_phone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/drawer_header_text"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:visibility="invisible" />
To get the menu item i can use navigationview.getmenuID(). But how to hide the header layout image programmatically