Search code examples
androidandroid-layoutandroid-togglebutton

How to move the drawer icon left to right in action bar..?


I want to place that icon left to right side. Just want to know where should I change code?enter image description here


Solution

  • In your XML layout file, make the gravity of your drawer Gravity: right or Gravity end instead of Gravity:start

    example

    <ListView
        android:id="@+id/drawer"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="end" //or you can use right also. 
        android:choiceMode="singleChoice"
    
      />