[mono-android] How to show margin lines to Table Layout

Meera m.shaik at jolttech.us
Mon Jun 18 22:04:07 UTC 2012



Hi Mono,

I am using Monodevelop 3.0.2 to design my Mobile App. I have created xaml
layout with Table Layouts to show dynamic rows in my App. But How can i show
Grid/Margin lines between columns and rows.

I have to show below kind of Vew with margin lines between columns.

Name    |  Phone              |  Email                               |
Detials
Meera1  | (090) 788-909  |  meera.shaik1 at jolttech.us  | <<Hyperlink to
redirect to detail page>>
Meera2  | (190) 788-909  |  meera.shaik2 at jolttech.us  | <<Hyperlink to
redirect to detail page>>
Meera3  | (290) 788-909  |  meera.shaik3 at jolttech.us  | <<Hyperlink to
redirect to detail page>>
Meera4  | (390) 788-909  |  meera.shaik4 at jolttech.us  | <<Hyperlink to
redirect to detail page>>

Please find the below layout xml i am using. I have attached Image also.

<?xml version="1.0" encoding="utf-8"?>
<TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:minWidth="25px"
    android:minHeight="25px"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:id="@+id/tableLayout1">
    <TableRow
        android:id="@+id/tableRow1">
        <TextView
            android:text="Account Name: "
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_column="0"
            android:id="@+id/textView9" />
        <AutoCompleteTextView
            android:id="@+id/txtAcctName"
            android:layout_height="37.3dp"
            android:layout_width="218.7dp" />
    </TableRow>
    <TableRow
        android:id="@+id/tableRow2">
        <TextView
            android:text="Account Type:"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_column="0"
            android:id="@+id/textView10" />
        <Spinner
            android:layout_width="fill_parent"
            android:layout_height="37.3dp"
            android:id="@+id/spnAcctType" />
    </TableRow>
    <TableRow
        android:id="@+id/tableRow3">
        <TextView
            android:text="Active:"
            android:textAppearance="?android:attr/textAppearanceSmall"
            android:layout_column="0"
            android:id="@+id/textView11" />
        <Spinner
            android:layout_width="fill_parent"
            android:layout_height="37.3dp"
            android:id="@+id/spnActive" />
    </TableRow>
    <View
        android:layout_height="2dip"
        android:background="#FF909090" />
    <Button
        android:text="Get Details"
        android:id="@+id/btnTrnDetails"
        android:layout_height="35.3dp" />
    <View
        android:layout_height="2dip"
        android:background="#FF909090" />
    <TableLayout
        android:minWidth="25px"
        android:minHeight="25px"
        android:id="@+id/tableLayout2">
        <TableRow
            android:layout_width="fill_parent">
            <TextView
                android:text="Name"
                android:id="@+id/lblFirstName"
                android:paddingLeft="5dip"
                android:layout_weight="1"
                android:layout_width="80.7dp" />
            <TextView
                android:text="Phone"
                android:id="@+id/lblPhone"
                android:layout_weight="1"
                android:layout_width="80.7dp" />
            <TextView
                android:text="Email"
                android:id="@+id/lblEmail"
                android:layout_weight="1"
                android:layout_width="85.7dp" />
            <TextView
                android:text="Detail"
                android:layout_weight="1"
                android:id="@+id/lblDetail" />
        </TableRow>
        <View
            android:layout_height="2dip"
            android:background="#FF909090"
            android:layout_width="20.7dp" />
        <TableRow
            android:layout_width="fill_parent">
            <TextView
                android:text="..."
                android:id="@+id/txtName"
                android:layout_width="50.7dp" />
            <TextView
                android:text="..."
                android:id="@+id/txtPhone"
                android:layout_width="40.7dp" />
            <TextView
                android:text="..."
                android:id="@+id/txtEmail"
                android:layout_width="50.7dp" />
            <TextView
                android:text="..."
                android:id="@+id/txtAction"
                android:linksClickable="true" />
        </TableRow>
    </TableLayout>
</TableLayout>


http://mono-for-android.1047100.n5.nabble.com/file/n5710410/mono_gridlines.png 




--
View this message in context: http://mono-for-android.1047100.n5.nabble.com/How-to-show-margin-lines-to-Table-Layout-tp5710410.html
Sent from the Mono for Android mailing list archive at Nabble.com.


More information about the Monodroid mailing list