What do you need to pass to v4.widget.DrawerLayout.isDrawerOpen()/.openDrawer()/.closeDrawer()

后端 未结 4 1235
死守一世寂寞
死守一世寂寞 2020-12-18 18:30

I\'ve been trying to move my code across to the DrawerLayout as suggested by android here as SlidingDrawer is deprecated.

My problem is tha

4条回答
  •  无人及你
    2020-12-18 18:41

    if you want to avoid references to views or layouts in order to call isDrawerOpen, another way can be applied.

    In this case you have to indicate the Gravity:

    mDrawerLayout.isDrawerOpen(Gravity.START);
    

    Being mDrawerLayout a reference to your DrawerLayout.

    as you said, don't forget android:layout_gravity="start"

提交回复
热议问题