0

I have created a TableLayout and placed it inside a ScrollView. Now I have created row of TableLayout using RelativeLayout rather than TableRow. Now I have a question that can we add seperator in TableLayout wheteher data is available or not, means, if data is not available then separator will shown. Another question is, can we scroll the table if only two rows are shown in table.

Please help me for the same. Any help is appreciated.

Spring Breaker
  • 7,846
  • 3
  • 31
  • 59
UserNew
  • 11
  • 1
  • 6

1 Answers1

0

Add A separator by

<View
    android:layout_width="fill_parent"
    android:layout_height="1dp"
    android:background="@android:color/darker_gray"/>

or programatically as

TextView v = new TextView(contex);

v.setHeight(1);

v.setWidht(MATCH_PARENT):

You can scroll only if the tablelayout is after more than fully occupied

Community
  • 1
  • 1
Nafeez
  • 48
  • 8