@@ -40,6 +40,7 @@ |
||
40 | 40 |
<activity |
41 | 41 |
android:name=".login.LoginActivity" |
42 | 42 |
android:configChanges="keyboardHidden|orientation|screenSize" |
43 |
+ android:theme="@android:style/Theme.NoTitleBar.Fullscreen" |
|
43 | 44 |
android:label="@string/app_name" |
44 | 45 |
android:screenOrientation="portrait"> |
45 | 46 |
|
@@ -2,6 +2,7 @@ package ai.pai.lensman.login; |
||
2 | 2 |
|
3 | 3 |
import android.content.Intent; |
4 | 4 |
import android.os.Bundle; |
5 |
+import android.support.v4.app.FragmentActivity; |
|
5 | 6 |
import android.text.TextUtils; |
6 | 7 |
import android.view.View; |
7 | 8 |
import android.widget.EditText; |
@@ -17,10 +18,8 @@ import butterknife.BindView; |
||
17 | 18 |
import butterknife.ButterKnife; |
18 | 19 |
import butterknife.OnClick; |
19 | 20 |
|
20 |
-public class LoginActivity extends BaseActivity implements LoginContract.View{ |
|
21 |
+public class LoginActivity extends FragmentActivity implements LoginContract.View{ |
|
21 | 22 |
|
22 |
- @BindView(R.id.et_login_pwd) EditText pwdET; |
|
23 |
- @BindView(R.id.et_login_user_name) EditText usernameET; |
|
24 | 23 |
@BindView(R.id.wheel_wait_http) ProgressWheel progressWheel; |
25 | 24 |
|
26 | 25 |
private LoginContract.Presenter presenter; |
@@ -36,7 +35,7 @@ public class LoginActivity extends BaseActivity implements LoginContract.View{ |
||
36 | 35 |
|
37 | 36 |
@OnClick(R.id.btn_login) |
38 | 37 |
public void login(){ |
39 |
- presenter.login(usernameET.getText().toString(),pwdET.getText().toString()); |
|
38 |
+ presenter.login(); |
|
40 | 39 |
} |
41 | 40 |
|
42 | 41 |
@Override |
@@ -14,7 +14,7 @@ public class LoginContract { |
||
14 | 14 |
} |
15 | 15 |
|
16 | 16 |
interface Presenter extends BasePresenter{ |
17 |
- void login(String userName,String pwd); |
|
17 |
+ void login(); |
|
18 | 18 |
} |
19 | 19 |
|
20 | 20 |
} |
@@ -18,13 +18,9 @@ import ai.pai.lensman.utils.UrlContainer; |
||
18 | 18 |
public class LoginInteractor implements BaseInteractor{ |
19 | 19 |
|
20 | 20 |
private HttpPostTask loginTask; |
21 |
- private String userName; |
|
22 |
- private String password; |
|
23 | 21 |
private InteractorListener<String> listener; |
24 | 22 |
|
25 |
- public LoginInteractor(String userName,String password,InteractorListener<String> listener){ |
|
26 |
- this.userName = userName; |
|
27 |
- this.password = password; |
|
23 |
+ public LoginInteractor(InteractorListener<String> listener){ |
|
28 | 24 |
this.listener = listener; |
29 | 25 |
} |
30 | 26 |
|
@@ -32,8 +28,8 @@ public class LoginInteractor implements BaseInteractor{ |
||
32 | 28 |
public void startJob() { |
33 | 29 |
cancelJob(); |
34 | 30 |
HashMap<String,String> params = new HashMap<>(); |
35 |
- params.put("username",userName); |
|
36 |
- params.put("password",password); |
|
31 |
+// params.put("username",userName); |
|
32 |
+// params.put("password",password); |
|
37 | 33 |
|
38 | 34 |
loginTask = new HttpPostTask(params){ |
39 | 35 |
|
@@ -20,9 +20,9 @@ public class LoginPresenter implements LoginContract.Presenter,BaseInteractor.In |
||
20 | 20 |
} |
21 | 21 |
|
22 | 22 |
@Override |
23 |
- public void login(String userName, String pwd) { |
|
23 |
+ public void login() { |
|
24 | 24 |
view.showProgressView(); |
25 |
- interactor = new LoginInteractor(userName,pwd,this); |
|
25 |
+ interactor = new LoginInteractor(this); |
|
26 | 26 |
interactor.startJob(); |
27 | 27 |
} |
28 | 28 |
|
@@ -2,9 +2,11 @@ |
||
2 | 2 |
<shape xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 |
android:shape="rectangle" > |
4 | 4 |
|
5 |
- <solid android:color="@color/colorPrimary" /> |
|
5 |
+ <solid android:color="@color/white" /> |
|
6 | 6 |
|
7 | 7 |
<corners |
8 |
- android:radius="2dp"/> |
|
8 |
+ android:radius="20dp"/> |
|
9 |
+ |
|
10 |
+ <stroke android:width="1dp" android:color="@color/wx_login_btn_stroke"/> |
|
9 | 11 |
|
10 | 12 |
</shape> |
@@ -2,107 +2,56 @@ |
||
2 | 2 |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
3 | 3 |
xmlns:progress="http://schemas.android.com/apk/res-auto" |
4 | 4 |
android:layout_width="match_parent" |
5 |
- android:layout_height="match_parent"> |
|
5 |
+ android:layout_height="match_parent" |
|
6 |
+ android:background="@color/white"> |
|
6 | 7 |
|
7 | 8 |
<RelativeLayout |
8 | 9 |
android:layout_width="match_parent" |
9 |
- android:layout_height="match_parent" |
|
10 |
- android:background="@color/login_bg_blue"> |
|
10 |
+ android:layout_height="match_parent"> |
|
11 | 11 |
|
12 | 12 |
<ImageView |
13 | 13 |
android:id="@+id/iv_login_logo" |
14 |
- android:layout_width="128dp" |
|
15 |
- android:layout_height="128dp" |
|
14 |
+ android:layout_width="231dp" |
|
15 |
+ android:layout_height="90dp" |
|
16 | 16 |
android:layout_centerHorizontal="true" |
17 |
- android:layout_marginTop="32dp" |
|
18 |
- android:src="@drawable/logo" /> |
|
17 |
+ android:layout_marginTop="130dp" |
|
18 |
+ android:src="@drawable/login_page_logo" /> |
|
19 | 19 |
|
20 |
- <LinearLayout |
|
21 |
- android:id="@+id/layout_login_edit" |
|
22 |
- android:layout_width="290dp" |
|
23 |
- android:layout_height="96dp" |
|
20 |
+ <TextView |
|
21 |
+ android:layout_width="wrap_content" |
|
22 |
+ android:layout_height="wrap_content" |
|
23 |
+ android:layout_centerHorizontal="true" |
|
24 | 24 |
android:layout_below="@id/iv_login_logo" |
25 |
+ android:text="@string/bar_app_name" |
|
26 |
+ android:layout_marginTop="12dp" |
|
27 |
+ android:textSize="18sp" |
|
28 |
+ android:textColor="@color/text_hint_grey_color"/> |
|
29 |
+ |
|
30 |
+ <TextView |
|
31 |
+ android:id="@+id/tv_agree_protocol" |
|
32 |
+ android:layout_width="wrap_content" |
|
33 |
+ android:layout_height="wrap_content" |
|
25 | 34 |
android:layout_centerHorizontal="true" |
26 |
- android:layout_marginTop="16dp" |
|
27 |
- android:background="@drawable/login_rounded_rect_bg" |
|
28 |
- android:orientation="vertical" |
|
29 |
- android:paddingLeft="10dp" |
|
30 |
- android:paddingRight="10dp"> |
|
31 |
- |
|
32 |
- <RelativeLayout |
|
33 |
- android:layout_width="match_parent" |
|
34 |
- android:layout_height="0dp" |
|
35 |
- android:layout_weight="1"> |
|
36 |
- |
|
37 |
- <ImageView |
|
38 |
- android:id="@+id/iv_login_user_avatar" |
|
39 |
- android:layout_width="28dp" |
|
40 |
- android:layout_height="28dp" |
|
41 |
- android:layout_centerVertical="true" |
|
42 |
- android:src="@drawable/user_avatar" /> |
|
43 |
- |
|
44 |
- <EditText |
|
45 |
- android:id="@+id/et_login_user_name" |
|
46 |
- android:layout_width="match_parent" |
|
47 |
- android:layout_height="match_parent" |
|
48 |
- android:layout_marginLeft="12dp" |
|
49 |
- android:layout_toRightOf="@+id/iv_login_user_avatar" |
|
50 |
- android:background="@color/white" |
|
51 |
- android:gravity="center_vertical" |
|
52 |
- android:hint="@string/account_name" |
|
53 |
- android:textColor="@color/dark_grey" |
|
54 |
- android:textColorHint="@color/text_hint_grey_color" |
|
55 |
- android:textSize="16sp" /> |
|
56 |
- |
|
57 |
- |
|
58 |
- </RelativeLayout> |
|
59 |
- |
|
60 |
- <View |
|
61 |
- android:layout_width="match_parent" |
|
62 |
- android:layout_height="1px" |
|
63 |
- android:background="@color/line_bg" /> |
|
64 |
- |
|
65 |
- <RelativeLayout |
|
66 |
- android:layout_width="match_parent" |
|
67 |
- android:layout_height="0dp" |
|
68 |
- android:layout_weight="1"> |
|
69 |
- |
|
70 |
- <ImageView |
|
71 |
- android:id="@+id/iv_login_pwd" |
|
72 |
- android:layout_width="28dp" |
|
73 |
- android:layout_height="28dp" |
|
74 |
- android:layout_centerVertical="true" |
|
75 |
- android:src="@drawable/password" /> |
|
76 |
- |
|
77 |
- <EditText |
|
78 |
- android:id="@+id/et_login_pwd" |
|
79 |
- android:layout_width="match_parent" |
|
80 |
- android:layout_height="match_parent" |
|
81 |
- android:layout_marginLeft="12dp" |
|
82 |
- android:layout_toRightOf="@+id/iv_login_pwd" |
|
83 |
- android:background="@color/white" |
|
84 |
- android:gravity="center_vertical" |
|
85 |
- android:hint="@string/password" |
|
86 |
- android:inputType="textPassword" |
|
87 |
- android:textColor="@color/dark_grey" |
|
88 |
- android:textColorHint="@color/text_hint_grey_color" |
|
89 |
- android:textSize="16sp" /> |
|
90 |
- |
|
91 |
- </RelativeLayout> |
|
92 |
- </LinearLayout> |
|
35 |
+ android:layout_alignParentBottom="true" |
|
36 |
+ android:text="@string/agree_protocol" |
|
37 |
+ android:layout_marginBottom="16dp" |
|
38 |
+ android:textSize="14sp" |
|
39 |
+ android:textColor="@color/agree_protocol_text_gray_color"/> |
|
93 | 40 |
|
94 | 41 |
<Button |
95 | 42 |
android:id="@+id/btn_login" |
96 | 43 |
android:layout_width="290dp" |
97 |
- android:layout_height="48dp" |
|
98 |
- android:layout_below="@id/layout_login_edit" |
|
44 |
+ android:layout_height="40dp" |
|
99 | 45 |
android:layout_centerHorizontal="true" |
100 |
- android:layout_marginTop="15dp" |
|
46 |
+ android:layout_above="@id/tv_agree_protocol" |
|
47 |
+ android:layout_marginBottom="50dp" |
|
101 | 48 |
android:background="@drawable/login_btn_rounded_rect_bg" |
102 | 49 |
android:gravity="center" |
103 |
- android:text="@string/login" |
|
104 |
- android:textColor="@color/white" |
|
50 |
+ android:text="@string/wx_login" |
|
51 |
+ android:textColor="@color/wx_login_btn_stroke" |
|
105 | 52 |
android:textSize="18sp" /> |
53 |
+ |
|
54 |
+ |
|
106 | 55 |
</RelativeLayout> |
107 | 56 |
|
108 | 57 |
<com.android.views.progressbar.ProgressWheel |
@@ -16,5 +16,7 @@ |
||
16 | 16 |
<color name="dark_grey">#333333</color> |
17 | 17 |
|
18 | 18 |
<color name="text_hint_grey_color">#CCCCCC</color> |
19 |
- <color name="login_bg_blue">#2F4159</color> |
|
19 |
+ <color name="wx_login_btn_stroke">#25CA47</color> |
|
20 |
+ <color name="agree_protocol_text_gray_color">#B3B3B3</color> |
|
21 |
+ |
|
20 | 22 |
</resources> |
@@ -1,15 +1,14 @@ |
||
1 | 1 |
<resources> |
2 | 2 |
<string name="app_name">拍爱</string> |
3 |
- <string name="bar_app_name">拍爱摄影师端</string> |
|
3 |
+ <string name="bar_app_name">拍爱摄影师版</string> |
|
4 | 4 |
<string name="bt_connected">已连接</string> |
5 | 5 |
<string name="bt_disconnected">已断开</string> |
6 | 6 |
<string name="briefs">简报</string> |
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> |
|
10 |
+ <string name="wx_login">微信登录</string> |
|
11 |
+ <string name="agree_protocol">已阅读并同意拍爱用户协议</string> |
|
13 | 12 |
|
14 | 13 |
<string name="login_success">登录成功</string> |
15 | 14 |
<string name="login_fail">登录失败</string> |