How i can achieve view like below screen shots (1 expected result, 2 Actual result). As you can see each items have border it is like left and bottom for some items and for some items it is right & bottom. I have created view using TableLayout
but now i don't know how to apply border to each row and item. My questions are:
It is correct way with
TableLayout
or should i useGridView
?In expected result as you can see borders are done with gradient at the end its just fade so can anyone give me drawable code for that.
TableLayout code:
<TableLayout
android:id="@+id/layout_pinlock_buttons"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/layout_pinlock_header"
android:layout_marginTop="@dimen/padding_15dp"
android:gravity="center_vertical"
android:padding="@dimen/padding_10dp"
android:stretchColumns="*" >
<TableRow
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/Tv_pinLock_01"
style="@style/TextViewMyTheme"
android:text="1" />
<TextView
android:id="@+id/Tv_pinLock_02"
style="@style/TextViewMyTheme"
android:text="2" />
<TextView
android:id="@+id/Tv_pinLock_03"
style="@style/TextViewMyTheme"
android:text="3" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/Tv_pinLock_04"
style="@style/TextViewMyTheme"
android:text="4" />
<TextView
android:id="@+id/Tv_pinLock_05"
style="@style/TextViewMyTheme"
android:text="5" />
<TextView
android:id="@+id/Tv_pinLock_06"
style="@style/TextViewMyTheme"
android:text="6" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_10dp"
android:layout_marginBottom="@dimen/padding_10dp">
<TextView
android:id="@+id/Tv_pinLock_07"
style="@style/TextViewMyTheme"
android:text="7" />
<TextView
android:id="@+id/Tv_pinLock_08"
style="@style/TextViewMyTheme"
android:text="8" />
<TextView
android:id="@+id/Tv_pinLock_09"
style="@style/TextViewMyTheme"
android:text="9" />
</TableRow>
<TableRow
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/padding_10dp"
android:layout_marginBottom="@dimen/padding_10dp"
android:gravity="center_horizontal">
<TextView
android:id="@+id/Tv_pinLock_00"
style="@style/TextViewMyTheme"
android:gravity="center"
android:text="0" />
</TableRow>
</TableLayout>