MVVMCross gridview column width -
i want display 5 columns through mvxgridview, have following code setup gridview , template not able desired result. getting 1 column i.e. first column displayed in single row
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" android:background="#ffffff"> <mvx.mvxgridview android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/gridview1" local:mvxbind="itemssource outages" local:mvxitemtemplate="@layout/item_outage" android:verticalspacing="0dp" android:horizontalspacing="0dp" android:stretchmode="columnwidth" android:numcolumns="auto_fit" android:columnwidth="50dp" android:gravity="center" />
item template
<linearlayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:local="http://schemas.android.com/apk/res-auto" android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent"> <relativelayout android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/relativelayout1"> <textview android:text="text" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/textview1" local:mvxbind="text wtg" /> <textview android:text="text 2" android:layout_width="match_parent" android:layout_height="wrap_content" android:id="@+id/textview2" local:mvxbind="text starttime" android:layout_torightof="@id/textview1" /> <textview android:text="text 3" android:id="@+id/textview3" local:mvxbind="text endtime" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_torightof="@id/textview2" /> <textview android:text="text 4" android:id="@+id/textview4" local:mvxbind="text category" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_torightof="@id/textview3" /> <textview android:text="text 5" android:id="@+id/textview5" local:mvxbind="text subcategory" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_torightof="@id/textview4" /> </relativelayout>
Comments
Post a Comment