I want a vertical and horizontal line drawn inside the a table row.
i cant attach image
i tried drawing lines around TextView
in table
For horizontal line
view v = new View(this);
v.setLayoutParams(new TableRow.LayoutParams(TableRow.LayoutParams.MATCH_PARENT, 1));
For Vertical line
view v = new View(this);
v.setLayoutParams(new TableRow.LayoutParams(1, TableRow.LayoutParams.MATCH_PARENT));
add this in your code and add it to table row Programmatically
Edited:
TableRow row;
row=(TableRow)findViewById(R.id.traningprogram_tableRow_mondayHeading);
row.addView(v);
if you want to create it in xml itself use this code after your each row items(TextView
)
for Horizontal line in XML
<View android:layout_width="match_parent"
android:background="@android:color/red"
android:layout_height="2dp" />
for vertical line in XML
<View android:layout_width="2dp"
android:background="@android:color/red"
android:layout_height="match_parent"/>
Try this it will work