Rounded edges for a TableRow

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Rounded edges for a TableRow

Postby lostInTransit » Mon Mar 30, 2009 7:51 am

Hi

Is it possible to display rounded edges for a table row? I am able to display a margin for the rows by using a trick mentioned in one of the posts here, but I do not know how I can give a rounded edges look to the rows.

Thanks for any help
lostInTransit
Developer
Developer
 
Posts: 26
Joined: Thu Feb 12, 2009 10:37 am
Location: India

Top

Postby stifry » Wed Apr 01, 2009 9:29 pm

You can use a 9-patch PNG image with rounded edges to create that effect like this:

Image

Here are the instructions for creating a 9-patch:

Draw 9-patch

Then you set the 9-patch drawable as a background like this:

Code: Select all
android:background="@drawable/textfield_default_translucent"


That refers to res/drawable/textfield_default_translucent.9.png that has the rounded edges.
Visit Trackaroo.com!
Trackmaster - Motorsports Lap Timer
Dynomaster - Performance Dyno
Image Image
User avatar
stifry
Developer
Developer
 
Posts: 46
Joined: Tue Feb 17, 2009 7:50 pm

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 4 guests