ab11
ab11

Reputation: 20100

How to draw a menu separator?

I would like to draw a separator between two views. I am aware that I can draw a line between the views with the xml below, but it's pretty ugly. I'd like it to be more like the menu separator used in java; beveled and rounded and such. Any advice on how to achieve this effect?

<View
    android:layout_width="3dip"
    android:layout_height="fill_parent"
    android:background="#FF000000">
 </View>

Upvotes: 0

Views: 2529

Answers (1)

Damp
Damp

Reputation: 3348

Android has a wide variety of drawables. Here's a couple ideas :

  1. Your view could have a rounded rectangle or an ellipse filled with a gradient as a background (the android documentation has them all)
  2. You could use a 9 patch image of a nice looking separator

Upvotes: 3

Related Questions