How to create a 'Table' in my Android app -
so i'm trying create 2-column table in android app , looking advice on best way approach it.
this table have header above each column , table might extend off bottom of screen. (will need scrolling). 1 of columns filled text. second column filled dropdown spinners.
i've tried multiple different ways not sure what's canonical way this...should using relative layout? should wrapping in scrollview? should use tableview tablerows? or should using combination of multiple of these?
note: i'd able have "borders" in table. maybe @ bottom of each row. read somewhere put textviews fill screen width-wise , have height of 2dp background color set. approach work suggesting?
thanks in advance advice!
seems job captain listview
! can addheader
scrolls or wrap in relativelayout
fixed header. can have divider between rows created automatically. rows generated adapter. row layout should like
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="horizontal"> <textview android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" /> <spinner android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1"/> </linearlayout>
Comments
Post a Comment