Please help me in this code below :(
I am working on a grid view which should show 4 fixed number of rows in landscape mode. It should display data from an arraylist and should scroll horizontally. I used normal grid view and rotated it by 270. Then inside the grid cell I have used a single Text View which I had to rotate by 90 in order to show the text straight. I set the numColumns property to 4. So the expected is to show 4 rows with data from the arraylist. But I am not getting the grid cell displaying text properky in 4 rows. I am pasting the below xml code for gridview and the single customized xml containing the textview which is inside the gridcell. I tried changing all the properties of the grid view, scroll view and text view. But dont know whats wrong with this 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 inside 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"
/>