android表格布局rowspan [英] android table layout rowspan
本文介绍了android表格布局rowspan的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想构建以下布局,但它不起作用.
I want to build the following layout but it is not working.
替代文字 http://toms-toy.de/rowspan.gif
<LinearLayout android:orientation="horizontal"...>
<ImageView ...></ImageView>
<TableLayout ...>
<TableRow..>
<ImageView ...></ImageView>
<ImageView ...></ImageView>
<ImageView ...></ImageView>
</TableRow>
<TableRow..>
<ImageView ...></ImageView>
<ImageView ...></ImageView>
<ImageView ...></ImageView>
</TableRow>
</TableLayout>
<ImageView ...></ImageView>
</LinearLayout>
推荐答案
我把这个组合起来真的很快,试试这个:
I put this together really fast, try this:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<ImageView android:layout_width="50dip" android:layout_height="100dip" android:background="#cc0000"/>
<TableLayout android:layout_width="wrap_content" android:layout_height="wrap_content">
<TableRow>
<ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#aaaa00"/>
<ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#00aa00"/>
<ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#aaaa00"/>
</TableRow>
<TableRow>
<ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#00aa00"/>
<ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#aaaa00"/>
<ImageView android:layout_width="50dip" android:layout_height="50dip" android:background="#00aa00"/>
</TableRow>
</TableLayout>
<ImageView android:layout_width="50dip" android:layout_height="100dip" android:background="#cc0000"/>
</LinearLayout>
这篇关于android表格布局rowspan的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文