I am trying to emulate the UI used by the gmail tablet app. When an item in the list view to the left is in an "activated" state I wish to draw an arrow indicator linking the list row to the main content fragment on the right-hand side. The "arrow" I am referring to is circled in this image:
Gmail App Screenshot
I have achieved this by using background drawables for the list rows which is satisfactory; however, I want to make use of a divider to separate the list and the main content area. So my question is how could I achieve this without using a background drawable? I tried having the arrow indicator as a child of the list row and attempting to draw it 1 pixel outside the row to cover the divider but this did not work.
Any help is appreciated, thanks.
Your question is similar to these:
Shadow Separator Between Android Fragments
ListView row marker ala GMail
Reading their answers it seems the easiest way to do what you want is using background 9-patch drawables.
In fact, the Gmail app uses 9-patch PNGs to achieve this effect. You can see it for yourslef if you take a look to the PNG files inside Gmail APK's res/drawable-hdpi folder (you will need a tool like AirDroid to obtain the APK from your device).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With