Skip to content

Instantly share code, notes, and snippets.

@theerasan
Created July 11, 2017 16:33
Show Gist options
  • Select an option

  • Save theerasan/6b358c1e461b2eb2a62cf7236fe41c32 to your computer and use it in GitHub Desktop.

Select an option

Save theerasan/6b358c1e461b2eb2a62cf7236fe41c32 to your computer and use it in GitHub Desktop.
<AutoCompleteTextView
android:id="@+id/email"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/prompt_email"
android:inputType="textEmailAddress"
android:text="@{viewModel.email}"
android:maxLines="1" />
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/prompt_password"
android:imeActionId="@+id/login"
android:imeActionLabel="@string/action_sign_in_short"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:text="@{viewModel.password}"
android:maxLines="1" />
<Button
android:id="@+id/email_sign_in_button"
style="?android:textAppearanceSmall"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@string/action_sign_in"
android:onClick="@{viewModel.onClickLogin}"
android:enabled="@{viewModel.readyToLogin}"
android:textStyle="bold" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment