I have a TableLayout
:
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:shrinkColumns="*"
android:stretchColumns="*" >
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<TextView
android:id="@+id/textView2"
android:text="Day High"
android:textStyle="bold" >
</TextView>
<TextView
android:id="@+id/textView3"
android:gravity="center_horizontal"
android:text="28°F" >
</TextView>
<TextView
android:id="@+id/textView4"
android:gravity="center_horizontal"
android:text="26°F" >
</TextView>
</TableRow>
</TableLayout>
And a Button
:
<Button
android:id="@+id/addItemTableRow"
style="?android:attr/buttonStyleSmall"
android:layout_width="match_parent"
android:layout_height="31dp"
android:textColor="@android:color/white"
android:text="Add row" />
I do not get to make by clicking on the button
adds a new row in the table.
Any thoughts how could I implement this task?