title: Duplicate value in NavigationView header after updating header text
body: <p>After updating my header text and image in NavigationView header, I'm getting duplicate value in NavigationView header.</p>
  
  <p>Here is my code part</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
      implements NavigationView.OnNavigationItemSelectedListener {
  
  boolean doubleBackToExitPressedOnce = false;
  SQLiteHelper dbHelper;
  String setName, setMail;
  AlertDialog.Builder builder, builder_verify;
  public static int count = 0;
  
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
      dbHelper = new SQLiteHelper(getApplicationContext());
      builder_verify = new AlertDialog.Builder(this);        
  
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      ActionBarDrawerToggle toggle = new ActionBarDrawerToggle(
              this, drawer, toolbar, R.string.navigation_drawer_open, R.string.navigation_drawer_close);
      drawer.setDrawerListener(toggle);
      toggle.syncState();     
  
      NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view);
      navigationView.setNavigationItemSelectedListener(this);
      View hView =  navigationView.inflateHeaderView(R.layout.nav_header_main);
      ImageView iv = (ImageView) hView.findViewById(R.id.imageView);
      TextView headerName = (TextView) hView.findViewById(R.id.txtName);
      TextView headerMail = (TextView) hView.findViewById(R.id.textEmail);
  
      iv.setImageResource(R.drawable.logo);
      headerName.setText("TEST");
      headerMail.setText("test@gmail.com");        
  }    
  }
  </code></pre>
  
  <p>In the above code i have added view to update my header text. Also i have added main XML code below</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  xmlns:tools="http://schemas.android.com/tools"
  android:id="@+id/drawer_layout"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:fitsSystemWindows="true"
  tools:openDrawer="start"&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"&gt;
  
      &lt;include
          layout="@layout/app_bar_main"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  
      &lt;FrameLayout
          android:id="@+id/flContent"
          android:layout_width="match_parent"
          android:layout_height="match_parent" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;android.support.design.widget.NavigationView
      android:id="@+id/nav_view"
      android:layout_width="wrap_content"
      android:layout_height="match_parent"
      android:layout_gravity="start"
      android:fitsSystemWindows="true"
      app:headerLayout="@layout/nav_header_main"
      app:menu="@menu/activity_main_drawer" /&gt;
  &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p>Also added navigation header layout </p>
  
  <p>nav_header_main.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="@dimen/nav_header_height"
  android:background="@drawable/side_nav_bar"
  android:gravity="bottom"
  android:orientation="vertical"
  android:paddingBottom="@dimen/activity_vertical_margin"
  android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  android:theme="@style/ThemeOverlay.AppCompat.Dark"&gt;
  
  &lt;ImageView
      android:id="@+id/imageView"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:paddingTop="@dimen/nav_header_vertical_spacing"
      android:src="@drawable/logo"/&gt;
  
  &lt;TextView
      android:id="@+id/txtName"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:paddingTop="@dimen/nav_header_vertical_spacing"
      android:text="Sample"
      android:textAppearance="@style/TextAppearance.AppCompat.Body2"
      android:textStyle="bold" /&gt;
  
  &lt;TextView
      android:id="@+id/textEmail"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="Sample Inc." /&gt;&lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Also i have added the screenshot for reference</p>
  
  <p><a href="https://i.stack.imgur.com/Qrb63.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Qrb63.png" alt="HearderView"></a></p>
  
  <p>Right now, I don't see any possibilities of changing the headerview. Any suggestions to avoid duplicate header text and image?</p>
  
  <p>Many thanks!</p>