今天工作任务提前完成了,就抽空更新一下博客,这篇博客以前我在其他论坛上发表过,今天有空就把它拉过来;制作表格一般来讲都是一条一条数据垂直显示,今天我们就将表格数据水平分布显示;下面请看效果图:
一、两种实现方法
1.通过list数据源在textview中进行横向赋值操作。
大家先看看布局文件:
android:id="@+id/relativeLayout1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" >
android:id="@+id/detail_project1_tv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight="1"
android:text="项目"
android:textSize="20sp"
android:background="@drawable/textviewborder"
android:gravity="center"
android:textColor="@color/black" />
android:id="@+id/detail_params1_tv"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_weight