title: make a RTL navigation Drawer in android
body: <p>I want to make my navigation open from <code>right to left</code>. But as soon as I change any of these steps my program face to error force closed after click on navigation after running the app.</p>
  
  <p>My main_activity.xml  </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>My custom_toolbar.xml</p>
  
  <p> </p>
  
  <pre><code>&lt;android.support.v7.widget.Toolbar
      android:id="@+id/toolbar"
      android:layout_width="match_parent"
      android:layout_height="?attr/actionBarSize"
      android:layout_gravity="right"
      android:background="@color/colorPrimary"&gt;
  
      &lt;TextView
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="title"
          android:padding="8dp"
          android:textColor="#fff"
          android:textSize="18sp"
          /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:src="@drawable/cnews"
          android:tint="#fff"
          android:layout_gravity="right"
          /&gt;
  &lt;/android.support.v7.widget.Toolbar&gt;
  
  
  //content
  &lt;include layout="@layout/content_main" /&gt; &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>My appbar_main.xml</p>
  
  <p>
  </p>
  
  <pre><code>&lt;include layout="@layout/toolbar_main" /&gt;
  </code></pre>
  
  <p></p>
  
  <p>My main_activity.java</p>
  
  <pre><code>import android.app.FragmentManager; import android.os.Bundle;  import android.support.design.widget.NavigationView;  import android.support.v4.view.GravityCompat;  import android.support.v4.widget.DrawerLayout;  import android.support.v7.app.ActionBarDrawerToggle;   import android.support.v7.app.AppCompatActivity;   import android.support.v7.widget.Toolbar; import android.view.Menu;   import android.view.MenuItem;
  
  public class MainActivity extends AppCompatActivity
          implements NavigationView.OnNavigationItemSelectedListener {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
          setSupportActionBar(toolbar);
  
          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);
      }
  
      @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
          if (id == R.id.action_settings) {
              return true;
          }
  
          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.home_page) {
              Home_page_fragment homeFragment = new Home_page_fragment();
              FragmentManager manager = getFragmentManager();
              manager.beginTransaction().replace(R.id.mainContent , homeFragment, homeFragment.getTag()).commit();
          } else if (id == R.id.tour_page) {
              Tour_page_fragment tourFragment = new Tour_page_fragment();
              FragmentManager manager = getFragmentManager();
              manager.beginTransaction().replace(R.id.mainContent , tourFragment, tourFragment.getTag()).commit();
  
          } else if (id == R.id.lstour_page) {
              LsTour_page_fragment LstourFragment = new LsTour_page_fragment();
              FragmentManager manager = getFragmentManager();
              manager.beginTransaction().replace(R.id.mainContent , LstourFragment, LstourFragment.getTag()).commit();
  
          } else if (id == R.id.hotel_page) {
  
          } else if (id == R.id.agency_page) {
  
          } else if (id == R.id.news_page) {
  
          }else if (id == R.id.logbook_page) {
  
          }else if (id == R.id.message_page) {
  
          }else if (id == R.id.favorite_page) {
  
          }
  
          DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout);
          drawer.closeDrawer(GravityCompat.START);
          return true;
      } }
  </code></pre>
  
  <p>I changed <code>"Start" to "end"</code> in <code>.xml</code> main activity and <code>java</code> main activity get force closed!</p>
  
  <p>I change "start" to "right" get force closed!!</p>
  
  <p>I used <code>RTL library</code> but again get forced closed!!!</p>
  
  <p>Thanks in advance.</p>