Meterial Design 로그인 예제 Layout 을 적어둔다.
<?xml version="1.0" encoding="utf-8"?> <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent">
<FrameLayout android:layout_width="match_parent" android:layout_height="wrap_content">
<LinearLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:orientation="vertical" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingBottom="@dimen/activity_vertical_margin">
<TextView android:layout_width="wrap_content" android:layout_height="300dp" android:gravity="center" android:text="Login" android:textStyle="bold" android:textSize="45dp" android:fontFamily="cursive" android:textColor="@color/colorWhite" android:layout_marginTop="0dp" android:background="@drawable/logo"/>
<com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginTop="20dp" android:layout_marginRight="20dp">
<com.google.android.material.textfield.TextInputEditText android:id="@+id/et_id" android:layout_width="match_parent" android:layout_height="wrap_content" android:background="@color/colorWhite" android:autofillHints="@string/prompt_id" android:hint="아이디" android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.textfield.TextInputLayout android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginTop="10dp" android:layout_marginRight="20dp">
<com.google.android.material.textfield.TextInputEditText android:id="@+id/et_pw" android:layout_width="match_parent" android:layout_height="wrap_content" android:autofillHints="@string/prompt_pw" android:hint="비밀번호" android:background="@color/colorWhite" android:imeOptions="actionDone" android:inputType="textPassword" android:selectAllOnFocus="true" />
</com.google.android.material.textfield.TextInputLayout>
<com.google.android.material.button.MaterialButton android:id="@+id/btn_login" style="@style/Widget.AppCompat.Button.Borderless.Colored" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginLeft="20dp" android:layout_marginTop="50dp" android:layout_marginRight="20dp" android:padding="10dp" android:text="로그인" android:textColor="@color/colorWhite" android:textSize="16sp" android:textStyle="bold" app:backgroundTint="@color/colorMint" app:cornerRadius="20dp" />
</LinearLayout> </FrameLayout>
</ScrollView>
|
이미지 파일
logo.zip