如何限制滑动抽屉的尺寸?

时间:2011-03-11 21:48:18

标签: android size position slidingdrawer

  

可能重复:
  Android: can height of SlidingDrawer be set with wrap_content?

打开时有没有办法改变滑动抽屉的尺寸?有没有办法将它放在顶部或左侧,因为默认选项是垂直方向的底部和水平方向的右侧。

1 个答案:

答案 0 :(得分:4)

This answer有关覆盖SlidingDrawer#onMeasure,为wrap_content启用SlidingDrawer似乎是赢家。

  

onMeasure()方法   基本SlidingDrawer课   覆盖布局模式   fill_parent,这就是原因   layout_height="wrap_content"不是   工作

修改 - 或者,您可以使用类似layout_height="200dp"的内容设置高度。

您的其他问题已经answered in the negative