0

Possible Duplicate:
Android: can height of SlidingDrawer be set with wrap_content?

Is there a way to change the size of a sliding drawer when it opens ? And is there a way to place it in the top, or in the left, because the default option are bottom for the vertical orientation and right to the horizontal orientation.

Community
  • 1
  • 1
Tsunaze
  • 3,204
  • 7
  • 44
  • 81

1 Answers1

4

This answer about overriding SlidingDrawer#onMeasure to enable wrap_content for SlidingDrawer seems like a winner.

The onMeasure() method of the SlidingDrawer class basically overrides the layout modes to fill_parent, this is why layout_height="wrap_content" is not working.

Edit - Or, you can set the height exactly in with something like layout_height="200dp".

Your other question was already answered in the negative.

Community
  • 1
  • 1
Matthew
  • 44,826
  • 10
  • 98
  • 87
  • but i was thinking something more like this one [link](http://www.androidpeople.com/android-sliding-drawer-tutorial) – Tsunaze Mar 11 '11 at 22:26
  • Sure, that looks like a good idea too. You can try it easily by just setting an exact layout_height on the SlidingDrawer – Matthew Mar 11 '11 at 22:41
  • the problem was that my linear layout didn't have a gravity android:gravity="bottom" . – Tsunaze Mar 11 '11 at 22:42