Skip to content

Instantly share code, notes, and snippets.

@rahulgautam
Created December 29, 2016 16:43
Show Gist options
  • Save rahulgautam/d3d986dd80a8309c73a1ba1cda5e86ac to your computer and use it in GitHub Desktop.
Save rahulgautam/d3d986dd80a8309c73a1ba1cda5e86ac to your computer and use it in GitHub Desktop.

Revisions

  1. @edvasqueza edvasqueza revised this gist Apr 6, 2014. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions form_layout.xml
    Original file line number Diff line number Diff line change
    @@ -15,7 +15,7 @@
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/frutaTxt" />
    android:text="@string/frutaTxt"/>

    <EditText
    android:layout_width="0dp"
    @@ -35,15 +35,16 @@
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/colorTxt" />
    android:text="@string/colorTxt"/>

    <Spinner
    android:layout_width="0dp"
    android:layout_weight="3"
    android:layout_height="wrap_content"
    android:id="@+id/colorSpinner"
    android:entries="@array/colorEntries" />
    android:entries="@array/colorEntries"/>
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="wrap_content">
    @@ -53,7 +54,7 @@
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/telefonoTxt" />
    android:text="@string/telefonoTxt"/>

    <EditText
    android:layout_width="0dp"
    @@ -74,7 +75,7 @@
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/emailTxt" />
    android:text="@string/emailTxt"/>

    <EditText
    android:layout_width="0dp"
  2. @edvasqueza edvasqueza revised this gist Apr 6, 2014. 1 changed file with 27 additions and 21 deletions.
    48 changes: 27 additions & 21 deletions form_layout.xml
    Original file line number Diff line number Diff line change
    @@ -1,86 +1,92 @@

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TableLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    android:layout_height="wrap_content">

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    android:layout_height="wrap_content">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/emailTxt" />
    android:text="@string/frutaTxt" />

    <EditText
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/emailHint"
    android:hint="@string/frutasHint"
    android:layout_height="wrap_content"
    android:id="@+id/emailTxt" />
    android:id="@+id/frutaTxt"
    android:imeOptions="flagNoExtractUi"/>
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    android:layout_height="wrap_content">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/telefonoTxt" />
    android:text="@string/colorTxt" />

    <EditText
    <Spinner
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/telefonoHint"
    android:layout_height="wrap_content"
    android:id="@+id/telefonoTxt" />
    android:id="@+id/colorSpinner"
    android:entries="@array/colorEntries" />
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    android:layout_height="wrap_content">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/frutaTxt" />
    android:text="@string/telefonoTxt" />

    <EditText
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/frutasHint"
    android:hint="@string/telefonoHint"
    android:layout_height="wrap_content"
    android:id="@+id/frutaTxt" />
    android:id="@+id/telefonoTxt"
    android:imeOptions="flagNoExtractUi"
    android:inputType="phone"/>
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    android:layout_height="wrap_content">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/colorTxt" />
    android:text="@string/emailTxt" />

    <Spinner
    <EditText
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/emailHint"
    android:layout_height="wrap_content"
    android:id="@+id/colorSpinner"
    android:entries="@array/colorEntries"/>
    android:id="@+id/emailTxt"
    android:inputType="textEmailAddress"
    android:singleLine="true"
    android:maxLength="20"
    android:imeOptions="actionSend|flagNoExtractUi"
    android:imeActionLabel="@string/guardarBtn"/>
    </TableRow>

    </TableLayout>
  3. @edvasqueza edvasqueza created this gist Apr 6, 2014.
    94 changes: 94 additions & 0 deletions form_layout.xml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,94 @@

    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <TableLayout
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/emailTxt" />

    <EditText
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/emailHint"
    android:layout_height="wrap_content"
    android:id="@+id/emailTxt" />
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/telefonoTxt" />

    <EditText
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/telefonoHint"
    android:layout_height="wrap_content"
    android:id="@+id/telefonoTxt" />
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/frutaTxt" />

    <EditText
    android:layout_width="0dp"
    android:layout_weight="3"
    android:hint="@string/frutasHint"
    android:layout_height="wrap_content"
    android:id="@+id/frutaTxt" />
    </TableRow>

    <TableRow
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">

    <TextView
    android:layout_width="0dp"
    android:layout_weight="2"
    android:layout_height="wrap_content"
    android:textAppearance="?android:attr/textAppearanceMedium"
    android:text="@string/colorTxt" />

    <Spinner
    android:layout_width="0dp"
    android:layout_weight="3"
    android:layout_height="wrap_content"
    android:id="@+id/colorSpinner"
    android:entries="@array/colorEntries"/>
    </TableRow>

    </TableLayout>

    <Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="right"
    android:text="@string/guardarBtn"
    android:id="@+id/guardarBtn"/>
    </LinearLayout>