-2

i want to bulid a table layouts like this.how?

alt text http://privateevent.co.uk/underground/img/gallery/19_1236343602.png

Praveen
  • 90,477
  • 74
  • 177
  • 219
  • Can you add some text describing the effect you are trying to achieve as it's not immediately obvious from the screenshot. It would also worth saying what you have tried so far. – David Webb Mar 04 '10 at 14:05
  • i can create multiple table layouts with padding="10dip" but cant create the layout circled corner. – Praveen Mar 04 '10 at 14:13
  • picture is not available anymore.. It would be useful if u describe content – Ewoks May 11 '12 at 12:45

2 Answers2

16

You can put a coloured background with rounded corners into a table by using a Shape background. Create such a shape in an XML file, put in your drawables folder.

<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="#99FFFFFF"/>
    <corners android:radius="30px"/>
    <padding android:left="0dp" android:top="0dp" android:right="0dp" android:bottom="0dp" /> 
</shape>

For example the above creates a semi-transparent white background with 30px rounded corners. You set this to the table by using

android:background="@drawable/my_shape_file"

in the XML file where you defined your table layout.

(And as Dave Webb said, putting a bit of detail into your question when you first ask it helps.)

Steve Haley
  • 55,374
  • 17
  • 77
  • 85
1

save that xml content to my_shape_file.xml to res/drawable/, then you got it ..

eggcaker
  • 106
  • 1
  • 4