Reputation: 197
How to do diferent size columns in Android GridView. I need one long fild for name and nine short for numbers. GridView XML:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<GridView
android:id="@+id/gridView1"
android:layout_width="match_parent"
android:layout_height="700dp"
android:numColumns="10" >
</GridView>
</RelativeLayout>
Item XML:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<EditText
android:id="@+id/editText1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
/>
</LinearLayout>
Upvotes: 1
Views: 191
Reputation: 661
do onething, take one xml having parent linear layout, with in the linear layout take sub linear layouts, with in the each linear layout we can design what you require, hope this will help to u.
Upvotes: 1