From 5f4c3669ddd8fe27449b04a4b9db12b2ca4b3688 Mon Sep 17 00:00:00 2001 From: zuoxiao <470321431@qq.com> Date: 星期二, 14 一月 2025 16:27:29 +0800 Subject: [PATCH] 1.文件上传和显示添加缩略图功能。 --- app/src/main/res/layout/activity_login.xml | 114 ++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 100 insertions(+), 14 deletions(-) diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml index 514bfbf..f67c259 100644 --- a/app/src/main/res/layout/activity_login.xml +++ b/app/src/main/res/layout/activity_login.xml @@ -2,43 +2,118 @@ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" - android:orientation="vertical"> + android:background="@mipmap/login_bg1" + android:orientation="vertical" + android:padding="20dp"> + + <ImageView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:src="@mipmap/logo1" + android:layout_centerHorizontal="true" + android:layout_marginTop="70dp" + /> <EditText android:id="@+id/name" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="45dp" android:layout_above="@+id/psLL" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" android:layout_marginBottom="10dp" - android:hint="璇疯緭鍏ヨ处鍙�" /> + android:background="@drawable/ic_edt_gray_bg" + android:hint="璇疯緭鍏ヨ处鍙�" + android:maxLines="1" + android:paddingLeft="15dp" + android:singleLine="true" + android:text="15802220723" /> <RelativeLayout android:id="@+id/psLL" android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_above="@+id/loginBtn" + android:layout_height="45dp" + android:layout_above="@+id/codeLL" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" - android:layout_marginBottom="20dp" + android:layout_marginBottom="10dp" + android:background="@drawable/ic_edt_gray_bg" + android:gravity="center" android:orientation="horizontal"> <EditText android:id="@+id/password" android:layout_width="match_parent" - android:layout_height="wrap_content" + android:layout_height="40dp" + android:layout_centerVertical="true" + android:layout_margin="5dp" android:layout_toLeftOf="@+id/passwordBtn" + android:background="@color/white" android:hint="璇疯緭鍏ュ瘑鐮�" - android:inputType="textPassword" /> + android:inputType="textPassword" + android:maxLines="1" + android:paddingLeft="10dp" + android:singleLine="true" + android:text="abc_123" /> - <ImageButton + <ImageView android:id="@+id/passwordBtn" android:layout_width="40dp" - android:layout_height="40dp" + android:layout_height="25dp" android:layout_alignParentRight="true" - android:layout_centerVertical="true" /> + android:layout_centerVertical="true" + android:layout_marginRight="5dp" + android:src="@drawable/vt_ps_close" /> + </RelativeLayout> + + <RelativeLayout + android:id="@+id/codeLL" + android:layout_width="match_parent" + android:layout_height="45dp" + android:layout_above="@+id/loginBtn" + android:layout_marginLeft="20dp" + android:layout_marginRight="20dp" + android:layout_marginBottom="15dp" + android:gravity="center" + android:orientation="horizontal" + android:visibility="gone"> + + <EditText + android:id="@+id/code" + android:layout_width="match_parent" + android:layout_height="40dp" + android:layout_centerVertical="true" + android:layout_toLeftOf="@+id/codeImg" + android:background="@drawable/ic_edt_gray_bg" + android:gravity="center" + android:hint="璇疯緭鍏ラ獙璇佺爜" + android:inputType="number" + android:maxLines="1" + android:singleLine="true" /> + + <ImageView + android:id="@+id/codeImg" + android:layout_width="150dp" + android:layout_height="35dp" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_marginRight="5dp" /> + + <TextView + android:id="@+id/codeError" + android:layout_width="120dp" + android:layout_height="35dp" + android:layout_alignParentRight="true" + android:layout_centerVertical="true" + android:layout_marginRight="5dp" + android:background="@drawable/ic_edt_gray_bg" + android:gravity="center" + android:text="鑾峰彇澶辫触\n鐐瑰嚮閲嶈瘯" + android:textSize="10sp" + android:visibility="gone" /> + + </RelativeLayout> <TextView @@ -48,12 +123,23 @@ android:layout_alignParentBottom="true" android:layout_marginLeft="20dp" android:layout_marginRight="20dp" - android:layout_marginBottom="20dp" - android:background="@drawable/ic_blue_background" + android:layout_marginBottom="40dp" + android:background="@drawable/btn_ripple" android:gravity="center" - android:text="鐧诲綍" + android:text="鐧� 褰�" android:textColor="@color/white" android:textSize="20sp" /> + <TextView + android:id="@+id/version" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignParentRight="true" + android:layout_alignParentBottom="true" + android:layout_marginRight="20dp" + android:text="V1.0" + android:textColor="@color/white" + android:textSize="15sp" + /> </RelativeLayout> \ No newline at end of file -- Gitblit v1.8.0