Logo etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster
Logo etiketine sahip kayıtlar gösteriliyor. Tüm kayıtları göster

18 Nisan 2016 Pazartesi

Android Right Side Navigation and Left Side Logo Toolbar (Appcompat 23.1.1)

For my personal project , I need a toolbar which has logo  on left side and navigation menu on the right side without setting RTL... (Why do I need this ,  because my designer made a mobile web design like this layout.)

I have used appcompat-v7 version 23.1.1  and tried to setup the layout (I have explained above) by giving gravity (start | end ) directive.

I didn't work!

For a weekend I was planning to go hometown and stay with my parents , it may an opportunity for diving to appcompat codes and change the layout .

After a 1 day confusion for building and understanding platform_framework_support project , in the end I have done the required changes.

You can download the dependency 23.1.inc.zip .


  • Download the file above.
  • Then change the dependency to ;

        compile 'com.android.support:appcompat-v7:23.1.inc@aar'

  • Then  unzip the package to the local repo.(In the gradle error output will give you from which path it is trying to retrieve package)
  • Change the navigationView gravity;
<android.support.design.widget.NavigationView
    android:id="@+id/nav_view"

    android:layout_width="wrap_content"

    android:layout_height="match_parent"

    android:background="?attr/colorPrimary"

    app:itemTextColor="@color/cardPrimary"

    android:layout_gravity="end"

    android:fitsSystemWindows="true"

    app:headerLayout="@layout/nav_header_main"

    app:menu="@menu/activity_main_drawer" />

  • Change the drawer close and open functions.Otherwise you will have error.
drawer.closeDrawer(GravityCompat.END);