Question

Was it helpful?

Solution

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.)

OTHER TIPS

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top