title: How to make navigation menu from right side in default of android studio 1.4
body: <p>I use default navigation activity of android studio 1.4.</p>
  
  <p>and then default has navigation left side , I want to make navigation menu from </p>
  
  <p>right side and change toggleButton from left to right . How to make</p>
  
  <p>I try to change layout_gravity of navigationview from start to end and change </p>
  
  <p>GravityCompat.START to GravityCompat.END in MainActivity.java , then error </p>
  
  <p>when I press toggle button, log cat show</p>
  
  <pre><code>java.lang.IllegalArgumentException: No drawer view found with gravity LEFT
  </code></pre>
  
  <p>My code (default from android studio 1.4)</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity
      implements NavigationView.OnNavigationItemSelectedListener {
  DrawerLayout drawer;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
      setSupportActionBar(toolbar);
  
      FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);
      fab.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                      .setAction("Action", null).show();
          }
      });
  
      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);
  }
  
  @Override
  public void onBackPressed() {
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      if (drawer.isDrawerOpen(GravityCompat.START)) {
          drawer.closeDrawer(GravityCompat.START);
      } else {
          super.onBackPressed();
      }
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.main, menu);
      return true;
  }
  
  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
      // Handle action bar item clicks here. The action bar will
      // automatically handle clicks on the Home/Up button, so long
      // as you specify a parent activity in AndroidManifest.xml.
      int id = item.getItemId();
  
  
  
  
      //noinspection SimplifiableIfStatement
  
  
      return super.onOptionsItemSelected(item);
  }
  
  @SuppressWarnings("StatementWithEmptyBody")
  @Override
  public boolean onNavigationItemSelected(MenuItem item) {
      // Handle navigation view item clicks here.
      int id = item.getItemId();
  
      if (id == R.id.nav_camara) {
          // Handle the camera action
      } else if (id == R.id.nav_gallery) {
  
      } else if (id == R.id.nav_slideshow) {
  
      } else if (id == R.id.nav_manage) {
  
      } else if (id == R.id.nav_share) {
  
      } else if (id == R.id.nav_send) {
  
      }
  
      DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
      drawer.closeDrawer(GravityCompat.START);
      return true;
  }
  </code></pre>
  
  <p>}</p>
  
  <p>activity_main.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>&lt;include layout="@layout/app_bar_main" android:layout_width="match_parent"
      android:layout_height="match_parent" /&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;
  </code></pre>
  
  <p></p>
  
  <p>Thankyou and
  Sorry for my bad english.</p>