0

Default in Android is to center the SlidingDrawer handle, but I don't want it that way. I would like it to be in the right instead.

I did search and found one answer: How to change android slidingdrawer handle button position

The problem with this is that the whole RelativeLayout becomes the handle and therefore I cant place any buttons next to the handle as they also will open the SlidingDrawer. I also tried to make the ImageView the handle but then it just ignored the RelativeLayout.

I guess I need to extend the SlidingDrawer but I don't know how to do that :(

EDIT: I solved it in a different way. I made the handler 0px in size and uses a different button to call SlidingDrawer.open(). This is not perfect as you can't "slide" to open if you don't implement if manually, but it works.

Community
  • 1
  • 1
  • I tried the suggestion in the edit (making the position of my additional button relative to the top of the [bottom to top] sliding drawer) but I encounter a problem in that if I specify the height of the sliding drawer as 300dp say, then my additional button is always positioned 300dp from the bottom of the sliding drawer regardless of whether the sliding drawer is open or closed. How did you get around this Pajn? (Setting the position of the additional button relative to the _content_ of the sliding drawer also doesn't work and the additional button stays fixed in its position.) – Adil Hussain Dec 30 '11 at 10:30
  • I'm actually using two buttons. One at the bottom and one in the content of the SlidingDrawer. I also made the backbutton close the drawer if open, else call super. –  Dec 31 '11 at 10:11

1 Answers1

0

With the RelativeLayout, did you try setting the "clickable" attribute to false. That should prevent it from receiving touch events.

museofwater
  • 409
  • 5
  • 9