如何显示组tableview android? [英] how to show group tableview android?
问题描述
我想建立一个像这样的表格布局.如何?
i want to bulid a table layouts like this.how?
替代文字 http://privateevent.co.uk/underground/img/gallery/19_1236343602.png
推荐答案
您可以使用形状背景将带圆角的彩色背景放入表格中.在 XML 文件中创建这样的形状,放入 drawables 文件夹中.
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>
例如,上面创建了一个带有 30px 圆角的半透明白色背景.您可以使用
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"
在您定义表格布局的 XML 文件中.
in the XML file where you defined your table layout.
(正如 Dave Webb 所说,在您第一次提出问题时在问题中加入一些细节会有所帮助.)
(And as Dave Webb said, putting a bit of detail into your question when you first ask it helps.)
这篇关于如何显示组tableview android?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!