how to show group tableview android? [closed]

徘徊边缘 提交于 2019-12-18 02:59:55

问题


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

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


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2379578/how-to-show-group-tableview-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!