Here is screenshot of what I have now And this is the screen that I want I need to stretch LinerLayouts (first name and second name fields) for full equals space, but I couldn't do it. I tried to use different stretchMode for GridLayout, but this has no effect. How can I do it? Here is the part of my code with GridLayout:
<GridLayout
android:layout_marginLeft="32dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:stretchMode="spacingWidth"
android:layout_column="1"
android:layout_row="0"
android:layout_columnWeight="1"
android:columnCount="2">
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="0"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/name"
android:id="@+id/txtName"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/textColorSecondary"
android:id="@+id/vName"
android:textSize="17sp"/>
</LinearLayout>
<LinearLayout
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:orientation="vertical"
android:layout_row="0"
android:layout_column="1"
android:weightSum="1">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/surname"
android:id="@+id/txtSurname"/>
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/textColorSecondary"
android:id="@+id/vSurname"
android:textSize="17sp"/>
</LinearLayout>
</GridLayout>
No comments:
Post a Comment