android - Grid View inside Scroll View giving issues with number of columns -
please help me in code below :(
i working on grid view should show 4 fixed number of rows in landscape mode. should display info arraylist , should scroll horizontally. used normal grid view , rotated 270. within grid cell have used single text view had rotate 90 in order show text straight. set numcolumns property 4. expected show 4 rows info arraylist. not getting grid cell displaying text properky in 4 rows. pasting below xml code gridview , single customized xml containing textview within gridcell. tried changing properties of grid view, scroll view , text view. dont know whats wrong code.
<scrollview android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_below="@id/textview_installed_app" > <linearlayout android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_gravity="top" android:orientation="vertical" > <gridview android:id="@+id/gridview" android:layout_width="wrap_content" android:layout_height="400dp" android:columnwidth="10dp" android:gravity="center" android:numcolumns="4" android:rotation="270" > </gridview> </linearlayout> </scrollview>
customized textview within gridview cell:
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" > <textview android:layout_gravity="center_vertical|center_horizontal" android:layout_marginright="10dp" android:id="@+id/textview_gridcell" android:layout_width="wrap_content" android:layout_height="150dp" android:rotation="90" />
android gridview scrollview horizontal-scrolling
No comments:
Post a Comment