SlidingDrawer handle design issue

Posted by bali182 on Stack Overflow See other posts from Stack Overflow or by bali182
Published on 2012-09-16T15:36:59Z Indexed on 2012/09/16 15:37 UTC
Read the original article Hit count: 210

I would like to create a SlidingDrawer, which has a handle like this: SlidingDrawer result

Until now i tought my solution was ok, which was:

1.) I created a 9 patch:

enter image description here

As you can see, the center part is not strechable, only the two sides (and the height, if needed). On most of the phones i got the desired result, shown above.

2.) Put it in this layout (just pseudo-code):

<SlidingDrawer (fullscreen)>
    <Button as handle (full width, backround the 9patch)/>
    <LinearLayout as content />
</SlidingDrawer> 

However, i tested the app on my friend's new Galaxy S3, and the result was something like this:

enter image description here

The part, which should be centered, was completely off one side. And i have no idea, why and it bugs me since then.

My Question:

  • Is this the prefered way (9 patch with full width) to acomplish the look i want?
  • If not, could someone suggest me a better solution?

© Stack Overflow or respective owner

Related posts about android

Related posts about user-interface