Full width Navigation Drawer

后端 未结 14 788
名媛妹妹
名媛妹妹 2020-12-08 03:57

I\'d like to create a full width navigation drawer. Setting layout_width to match_parent on @+id/left_drawer yields in width of about

14条回答
  •  生来不讨喜
    2020-12-08 04:40

    Nipper's FullDrawerLayout Class is just simply awesome.. it's performance is also faster than the default drawer how ever you can;t use it on devices with api that don't have view.getLayoutDirection(); (i'e : Class doesn;t work on all gingerbread devices )

    so what i did was

    replaced all

    view.getLayoutDirection();
    

    with the below code

    GravityCompat.getAbsoluteGravity(gravity,ViewCompat.getLayoutDirection(this));
    

    I have my support library updated to the latest also have extended the fullDrawerlayout to the support navigational drawer. Now it works fine Gingerbread devices as well

提交回复
热议问题