@@ -0,0 +1,19 @@ |
||
| 1 |
+package ai.pai.lensman.login; |
|
| 2 |
+ |
|
| 3 |
+/** |
|
| 4 |
+ * Created by chengzhenyu on 2016/8/11. |
|
| 5 |
+ */ |
|
| 6 |
+public class LoginContract {
|
|
| 7 |
+ |
|
| 8 |
+ interface LoginView{
|
|
| 9 |
+ |
|
| 10 |
+ void showProgressView(); |
|
| 11 |
+ void hideProgressView(); |
|
| 12 |
+ |
|
| 13 |
+ } |
|
| 14 |
+ |
|
| 15 |
+ interface LoginPresenter{
|
|
| 16 |
+ |
|
| 17 |
+ } |
|
| 18 |
+ |
|
| 19 |
+} |
@@ -2,11 +2,9 @@ |
||
| 2 | 2 |
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | 3 |
android:shape="rectangle" > |
| 4 | 4 |
|
| 5 |
- <solid android:color="#FFFFFF" /> |
|
| 5 |
+ <solid android:color="@color/colorPrimary" /> |
|
| 6 | 6 |
|
| 7 | 7 |
<corners |
| 8 |
- android:radius="8dp"/> |
|
| 9 |
- |
|
| 10 |
- <stroke android:width="1dp" android:color="@color/grey"/> |
|
| 8 |
+ android:radius="2dp"/> |
|
| 11 | 9 |
|
| 12 | 10 |
</shape> |
@@ -0,0 +1,10 @@ |
||
| 1 |
+<?xml version="1.0" encoding="utf-8"?> |
|
| 2 |
+<shape xmlns:android="http://schemas.android.com/apk/res/android" |
|
| 3 |
+ android:shape="rectangle" > |
|
| 4 |
+ |
|
| 5 |
+ <solid android:color="@color/white" /> |
|
| 6 |
+ |
|
| 7 |
+ <corners |
|
| 8 |
+ android:radius="4dp"/> |
|
| 9 |
+ |
|
| 10 |
+</shape> |
@@ -1,16 +1,101 @@ |
||
| 1 | 1 |
<?xml version="1.0" encoding="utf-8"?> |
| 2 |
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
| 3 |
- android:orientation="vertical" android:layout_width="match_parent" |
|
| 2 |
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
|
| 3 |
+ android:layout_width="match_parent" |
|
| 4 | 4 |
android:layout_height="match_parent" |
| 5 |
- android:background="@color/background_white"> |
|
| 5 |
+ android:background="@color/login_bg_blue"> |
|
| 6 |
+ |
|
| 7 |
+ <ImageView |
|
| 8 |
+ android:id="@+id/iv_login_logo" |
|
| 9 |
+ android:layout_width="128dp" |
|
| 10 |
+ android:layout_height="128dp" |
|
| 11 |
+ android:layout_centerHorizontal="true" |
|
| 12 |
+ android:layout_marginTop="32dp" |
|
| 13 |
+ android:src="@drawable/logo" /> |
|
| 14 |
+ |
|
| 15 |
+ <LinearLayout |
|
| 16 |
+ android:id="@+id/layout_login_edit" |
|
| 17 |
+ android:layout_width="290dp" |
|
| 18 |
+ android:layout_height="96dp" |
|
| 19 |
+ android:layout_below="@id/iv_login_logo" |
|
| 20 |
+ android:layout_centerHorizontal="true" |
|
| 21 |
+ android:layout_marginTop="16dp" |
|
| 22 |
+ android:background="@drawable/login_rounded_rect_bg" |
|
| 23 |
+ android:orientation="vertical" |
|
| 24 |
+ android:paddingLeft="10dp" |
|
| 25 |
+ android:paddingRight="10dp"> |
|
| 26 |
+ |
|
| 27 |
+ <RelativeLayout |
|
| 28 |
+ android:layout_width="match_parent" |
|
| 29 |
+ android:layout_height="0dp" |
|
| 30 |
+ android:layout_weight="1"> |
|
| 31 |
+ |
|
| 32 |
+ <ImageView |
|
| 33 |
+ android:id="@+id/iv_login_user_avatar" |
|
| 34 |
+ android:layout_width="28dp" |
|
| 35 |
+ android:layout_height="28dp" |
|
| 36 |
+ android:layout_centerVertical="true" |
|
| 37 |
+ android:src="@drawable/user_avatar" /> |
|
| 38 |
+ |
|
| 39 |
+ <EditText |
|
| 40 |
+ android:id="@+id/et_login_user_name" |
|
| 41 |
+ android:layout_width="match_parent" |
|
| 42 |
+ android:layout_height="match_parent" |
|
| 43 |
+ android:layout_marginLeft="12dp" |
|
| 44 |
+ android:layout_toRightOf="@+id/iv_login_user_avatar" |
|
| 45 |
+ android:background="@color/white" |
|
| 46 |
+ android:gravity="center_vertical" |
|
| 47 |
+ android:hint="@string/account_name" |
|
| 48 |
+ android:textColor="@color/dark_grey" |
|
| 49 |
+ android:textColorHint="@color/text_hint_grey_color" |
|
| 50 |
+ android:textSize="16sp" /> |
|
| 51 |
+ |
|
| 52 |
+ |
|
| 53 |
+ </RelativeLayout> |
|
| 54 |
+ |
|
| 55 |
+ <View |
|
| 56 |
+ android:layout_width="match_parent" |
|
| 57 |
+ android:layout_height="1px" |
|
| 58 |
+ android:background="@color/line_bg"/> |
|
| 59 |
+ <RelativeLayout |
|
| 60 |
+ android:layout_width="match_parent" |
|
| 61 |
+ android:layout_height="0dp" |
|
| 62 |
+ android:layout_weight="1"> |
|
| 63 |
+ |
|
| 64 |
+ <ImageView |
|
| 65 |
+ android:id="@+id/iv_login_pwd" |
|
| 66 |
+ android:layout_width="28dp" |
|
| 67 |
+ android:layout_height="28dp" |
|
| 68 |
+ android:layout_centerVertical="true" |
|
| 69 |
+ android:src="@drawable/password" /> |
|
| 70 |
+ |
|
| 71 |
+ <EditText |
|
| 72 |
+ android:id="@+id/et_login_pwd" |
|
| 73 |
+ android:layout_width="match_parent" |
|
| 74 |
+ android:layout_height="match_parent" |
|
| 75 |
+ android:layout_marginLeft="12dp" |
|
| 76 |
+ android:layout_toRightOf="@+id/iv_login_pwd" |
|
| 77 |
+ android:background="@color/white" |
|
| 78 |
+ android:gravity="center_vertical" |
|
| 79 |
+ android:hint="@string/password" |
|
| 80 |
+ android:inputType="textPassword" |
|
| 81 |
+ android:textColor="@color/dark_grey" |
|
| 82 |
+ android:textColorHint="@color/text_hint_grey_color" |
|
| 83 |
+ android:textSize="16sp" /> |
|
| 84 |
+ |
|
| 85 |
+ </RelativeLayout> |
|
| 86 |
+ </LinearLayout> |
|
| 6 | 87 |
|
| 7 | 88 |
<Button |
| 8 | 89 |
android:id="@+id/btn_login" |
| 9 |
- android:layout_width="match_parent" |
|
| 10 |
- android:layout_height="50dp" |
|
| 11 |
- android:layout_gravity="center" |
|
| 90 |
+ android:layout_width="290dp" |
|
| 91 |
+ android:layout_height="48dp" |
|
| 92 |
+ android:layout_below="@id/layout_login_edit" |
|
| 93 |
+ android:layout_centerHorizontal="true" |
|
| 94 |
+ android:layout_marginTop="15dp" |
|
| 95 |
+ android:background="@drawable/login_btn_rounded_rect_bg" |
|
| 12 | 96 |
android:gravity="center" |
| 13 |
- android:textSize="20sp" |
|
| 14 |
- android:textColor="@color/black" |
|
| 15 |
- android:text="登录"/> |
|
| 16 |
-</LinearLayout> |
|
| 97 |
+ android:text="@string/login" |
|
| 98 |
+ android:textColor="@color/white" |
|
| 99 |
+ android:textSize="18sp" /> |
|
| 100 |
+ |
|
| 101 |
+</RelativeLayout> |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 |
android:layout_width="wrap_content" |
| 4 | 4 |
android:layout_height="wrap_content" |
| 5 | 5 |
android:layout_margin="3dp" |
| 6 |
- android:background="@drawable/rounded_rect"> |
|
| 6 |
+ android:background="@drawable/login_rounded_rect_bg"> |
|
| 7 | 7 |
|
| 8 | 8 |
<ImageView |
| 9 | 9 |
android:id="@+id/iv_session_item" |
@@ -14,4 +14,7 @@ |
||
| 14 | 14 |
|
| 15 | 15 |
<color name="pop_bg_color">#F7F7F7</color> |
| 16 | 16 |
<color name="dark_grey">#333333</color> |
| 17 |
+ |
|
| 18 |
+ <color name="text_hint_grey_color">#CCCCCC</color> |
|
| 19 |
+ <color name="login_bg_blue">#2F4159</color> |
|
| 17 | 20 |
</resources> |
@@ -7,6 +7,10 @@ |
||
| 7 | 7 |
<string name="settings">设置</string> |
| 8 | 8 |
<string name="scene">场景</string> |
| 9 | 9 |
|
| 10 |
+ <string name="login">登录</string> |
|
| 11 |
+ <string name="account_name">账号</string> |
|
| 12 |
+ <string name="password">密码</string> |
|
| 13 |
+ |
|
| 10 | 14 |
<string name="network_disconnect">当前无网络连接</string> |
| 11 | 15 |
|
| 12 | 16 |
<string name="qr_scan_hint">将取景框对准二维码,\n即可自动扫码</string> |