I have a layout that acts as a type of table which has two linearlayouts. The main linearlayout has vertical orientation and the one inside this one has a horizontal orientation. The code is below ...
XML file ...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/view_below_linear_layout_three_team_spuck"
android:background="@drawable/cell_shape"
android:id="@+id/linear_layout_four_team_spuck"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="45dp">
<TextView
android:layout_width="50dp"
android:layout_height="match_parent"
android:text="1"
android:id="@+id/serial_number_team_spuck"
android:gravity="center"
android:background="@drawable/cell_shape"
android:textSize="20dp"
/>
<ImageView
android:layout_width="50dp"
android:layout_height="35dp"
android:layout_gravity="center"
android:id="@+id/the_smallperson_2_team_spuck"
android:src="@drawable/the_smallperson"
android:layout_centerVertical="true"
android:layout_toRightOf="@+id/serial_number_team_spuck"
android:layout_toEndOf="@+id/serial_number_team_spuck" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="#B2B2B2"
android:textSize="12dp"
android:gravity="center"
android:id="@+id/spuck_table_name"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/the_smallperson_2_team_spuck"
android:layout_toEndOf="@+id/the_smallperson_2_team_spuck"
android:layout_marginLeft="14dp"
android:layout_marginStart="14dp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="#B2B2B2"
android:textSize="12dp"
android:gravity="center"
android:id="@+id/spuck_table_speed"
android:layout_marginLeft="30dp"
android:layout_marginStart="30dp"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/spuck_table_name"
android:layout_toEndOf="@+id/spuck_table_name" />
<TextView
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:textColor="#B2B2B2"
android:textSize="12dp"
android:gravity="center"
android:id="@+id/spuck_table_points"
android:layout_marginLeft="29dp"
android:layout_marginStart="39dp"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/spuck_table_speed"
android:layout_toEndOf="@+id/spuck_table_speed" />
</LinearLayout>
</LinearLayout>
I want to add new entries into this layout and view this as a table. The entries I want to add are the three textviews inside the second linearlayout. Since I am getting the data through php database I want to achive this through java, any idea on how to do this?