Mar 10, 2011

Table Layout With Scrolling and Good Looking

in real time project maximum we have to use table layout , but in android table  we can't see borders so we should use some other resources .
in table layout .

at tahe same time in table layout we have number of attributes

Give the TableLayout a background color, give the TableRow another background color and set margin to the TableRow. The amount of the margin is the amount of the “border”. Same for each View in the TableRow.
for Full Explanation regarding Table see my my previouse tutorial

<TableRow>    // for single row   i am placing two text fields 
<TextView android:text="Invoice Date" android:textColor="#190707"  
android:background="#ffffff" android:padding="10dip"
android:layout_marginTop="0.1dip" android:layout_marginLeft="0.1dip"
android:layout_marginRight="0.1dip" android:textStyle="bold" />
<TextView android:id="@+id/iTvDate" android:textColor="#190707"
android:text="09/03/2011" android:background="#ffffff"
android:layout_marginTop="0.1dip" android:layout_marginRight="0.1dip"
android:textStyle="bold" android:padding="10dip" />

1 comment: