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;








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

  • Change the drawer close and open functions.Otherwise you will have error.

Hiç yorum yok:

Yorum Gönder