How to set Navigation Drawer icons to the right side of the Item Texts?

后端 未结 4 768
旧时难觅i
旧时难觅i 2021-01-24 05:33

My Project Screenshot: My Project

My Target Design: My Target

I have created a (right to left) navigation drawer. It\'s working fine but when I\'m trying to move

4条回答
  •  孤城傲影
    2021-01-24 06:17

    Add to your Activity before setContentView(R.layout.main_activity);:

     if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR1) {
            getWindow().getDecorView().setLayoutDirection(View.LAYOUT_DIRECTION_RTL);
        }
    

    This is only possible on API 17+

提交回复
热议问题