Skip to content

Instantly share code, notes, and snippets.

@dadamssg
Created June 5, 2013 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dadamssg/5716801 to your computer and use it in GitHub Desktop.
Save dadamssg/5716801 to your computer and use it in GitHub Desktop.
login.xml
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
tools:context=".HomeActivity"
>
<!-- Login progress -->
<LinearLayout
android:id="@+id/login_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:gravity="center_horizontal"
android:orientation="vertical"
android:visibility="gone"
>
<ProgressBar
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
/>
<TextView
android:id="@+id/login_status_message"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"
android:fontFamily="sans-serif-light"
android:text="@string/loginProgress"
android:textAppearance="?android:attr/textAppearanceMedium"
/>
</LinearLayout>
<!-- Login form -->
<ScrollView
android:id="@+id/login_form"
android:layout_width="match_parent"
android:layout_height="match_parent"
>
<LinearLayout
style="@style/LoginFormContainer"
android:orientation="vertical"
>
<EditText
android:id="@+id/username"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/usernameHint"
android:inputType="text"
android:maxLines="1"
android:singleLine="true"
android:layout_marginTop="5dp"
android:textSize="22dp"/>
<EditText
android:id="@+id/password"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:hint="@string/passwordHint"
android:imeActionId="@+id/login"
android:imeActionLabel="@string/signIn"
android:imeOptions="actionUnspecified"
android:inputType="textPassword"
android:maxLines="1"
android:singleLine="true"
android:textSize="22dp"
android:layout_marginTop="5dp"/>
<EditText
android:id="@+id/hostDomain"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="text"
android:maxLines="1"
android:singleLine="true"
android:text="@string/domainDefault"
android:hint="@string/domainHint"
android:layout_marginTop="5dp"/>
<Button
android:id="@+id/sign_in_button"
android:layout_width="fill_parent"
android:layout_marginTop="20dp"
android:text="@string/signIn"
android:background="@drawable/btn_blue_metro"
android:textColor="#FFF"
android:textStyle="bold"
android:textSize="15dp"
android:layout_height="37dp"
/>
</LinearLayout>
</ScrollView>
</merge>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment