android - Replacing TableLayout with ListView? -



android - Replacing TableLayout with ListView? -

i using tablelayout within scrollview , multiple listview within tablerows getting next results.

with next xml

<?xml version="1.0" encoding="utf-8"?> <linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <include layout="@layout/progress_bar" /> <scrollview android:id="@+id/sv" android:layout_width="match_parent" android:layout_height="match_parent" > <tablelayout android:layout_width="match_parent" android:layout_height="wrap_content" > <tablerow android:id="@+id/tr_lbl_topsongs" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/app_orange" android:padding="5dp" > <textview android:id="@+id/tv_lbl_topsongs" android:layout_width="0dp" android:layout_height="wrap_content" android:layout_weight="1" android:text="top songs" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/app_white" /> </tablerow> <tablerow android:id="@+id/tr_content_topsongs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="5dp" android:layout_marginright="5dp" > <listview android:id="@+id/lv_topsongs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:listselector="@android:color/transparent" > </listview> </tablerow> <tablerow android:id="@+id/tr_viewmore_topsongs" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|center_vertical" android:background="@color/app_offwhite" android:gravity="center_horizontal|center_vertical" android:padding="5dp" > <textview android:id="@+id/tv_viewmore_topsongs" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_horizontal|center_vertical" android:text="view more" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/app_gray" /> </tablerow> <tablerow android:id="@+id/tr_lbl_topvideos" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/app_orange" android:padding="5dp" > <textview android:id="@+id/tv_lbl_topvideos" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="top videos" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/app_white" /> </tablerow> <tablerow android:id="@+id/tr_content_topvideos" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="5dp" android:layout_marginright="5dp" > <listview android:id="@+id/lv_topvideos" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:listselector="@android:color/transparent" > </listview> </tablerow> <tablerow android:id="@+id/tr_viewmore_topvideos" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="center_horizontal|center_vertical" android:background="@color/app_offwhite" android:gravity="center_horizontal|center_vertical" android:padding="5dp" > <textview android:id="@+id/tv_viewmore_topvideos" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_horizontal|center_vertical" android:text="view more" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/app_gray" /> </tablerow> <tablerow android:id="@+id/tr_lbl_topringtones" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/app_orange" android:padding="5dp" > <textview android:id="@+id/tv_lbl_topringtones" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="top ringtones" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/app_white" /> </tablerow> <tablerow android:id="@+id/tr_content_topringtones" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginleft="5dp" android:layout_marginright="5dp" > <listview android:id="@+id/lv_topringtones" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_weight="1" android:listselector="@android:color/transparent" > </listview> </tablerow> <tablerow android:id="@+id/tr_viewmore_topringtones" android:layout_width="match_parent" android:layout_height="0dp" android:layout_gravity="center_horizontal|center_vertical" android:layout_weight="1" android:background="@color/app_offwhite" android:gravity="center_horizontal|center_vertical" android:padding="5dp" > <textview android:id="@+id/tv_viewmore_topringtones" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_weight="1" android:gravity="center_horizontal|center_vertical" android:text="view more" android:textappearance="?android:attr/textappearancesmall" android:textcolor="@color/app_gray" /> </tablerow> </tablelayout> </scrollview> </linearlayout>

i done hacks on listviews scroll issues created conflict of scrollview , listview. realized creating mess navigationdrawer want shift single listview approach. possible? example? in advance.

android android-listview

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -