带有始终可见标签图像的导航抽屉

时间:2013-07-13 20:00:15

标签: android menu drawerlayout

enter image description here enter image description here

我必须在左边实现这个滑动菜单。 DrawerLayout效果很好,唯一的问题是这个始终可见的标签图片:

enter image description here

通常所有抽屉都是隐藏的,但我需要这个小矩形才能伸出来。我该怎么做?也许我应该使用SlidingPaneLayout代替?

Here你有一个很小的,可以运行的Eclipse Android项目,实现DrawerLayout(50行Java + 35行XML)。它是来自documentation的截断版本的样本。

1 个答案:

答案 0 :(得分:1)

我尝试了不同的方法,但最后使用了this SlidingDrawer的推广,它允许从左向右滑动(以及其他方向)。代码写得很好,它就像一个魅力。标签图片为ImageView @+id/handle,菜单为LinearLayout @+id/content

相关问题