From e3f364cdd9c322d1b54aa6a311bc5ce0fe007fbe Mon Sep 17 00:00:00 2001
From: panqihua <1029559041@qq.com>
Date: Mon, 23 Mar 2020 04:43:47 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E5=86=8C=E7=95=8C?=
=?UTF-8?q?=E9=9D=A2?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../pocket/ui/login/LoginActivity.java | 7 ++
.../pocket/ui/register/RegisterActivity.java | 26 ++++-
app/src/main/res/layout/activity_login.xml | 20 ++--
app/src/main/res/layout/activity_register.xml | 100 ++++++++++++++++++
app/src/main/res/layout/titlebar_layout.xml | 21 ++++
app/src/main/res/values-en-rUS/dimens.xml | 3 +
app/src/main/res/values-en-rUS/strings.xml | 3 +
app/src/main/res/values-zh-rCN/dimens.xml | 3 +
app/src/main/res/values-zh-rCN/strings.xml | 3 +
app/src/main/res/values/dimens.xml | 2 +-
app/src/main/res/values/strings.xml | 3 +
11 files changed, 175 insertions(+), 16 deletions(-)
create mode 100644 app/src/main/res/layout/titlebar_layout.xml
diff --git a/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java b/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java
index 0fadf14..525a69b 100644
--- a/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java
+++ b/app/src/main/java/com/community/pocket/ui/login/LoginActivity.java
@@ -1,6 +1,7 @@
package com.community.pocket.ui.login;
import android.app.Activity;
+import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.TextWatcher;
@@ -20,6 +21,7 @@ import androidx.lifecycle.ViewModelProvider;
import com.community.pocket.R;
import com.community.pocket.ui.BaseActivity;
+import com.community.pocket.ui.register.RegisterActivity;
import com.community.pocket.util.PropertiesUtil;
import org.xutils.view.annotation.ContentView;
@@ -129,6 +131,11 @@ public class LoginActivity extends BaseActivity {
passwordEditText.getText().toString());
}
+ @Event(value = R.id.register)
+ private void register(View v) {
+ startActivity(new Intent(this, RegisterActivity.class));
+ }
+
//监听密码软键盘输入
@Event(type = TextView.OnEditorActionListener.class, value = R.id.password)
private boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
diff --git a/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java b/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java
index b0cde42..dcbf79e 100644
--- a/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java
+++ b/app/src/main/java/com/community/pocket/ui/register/RegisterActivity.java
@@ -1,11 +1,35 @@
package com.community.pocket.ui.register;
+import android.content.Intent;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.Toast;
+
+import androidx.annotation.Nullable;
+
import com.community.pocket.R;
+import com.community.pocket.ui.BaseActivity;
+import com.community.pocket.ui.login.LoginActivity;
import org.xutils.view.annotation.ContentView;
+import org.xutils.view.annotation.Event;
@ContentView(R.layout.activity_register)
-public class RegisterActivity {
+public class RegisterActivity extends BaseActivity {
+
+ @Override
+ protected void onCreate(@Nullable Bundle savedInstanceState) {
+ super.onCreate(savedInstanceState);
+ }
+ @Event(value = R.id.register)
+ private void register(View v) {
+ Toast.makeText(this, getString(R.string.action_register), Toast.LENGTH_SHORT).show();
+ }
+ @Event(value = R.id.back)
+ private void back(View v) {
+ startActivity(new Intent(this, LoginActivity.class));
+ finish();
+ }
}
diff --git a/app/src/main/res/layout/activity_login.xml b/app/src/main/res/layout/activity_login.xml
index cadf781..27b1073 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -11,19 +11,7 @@
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".ui.login.LoginActivity">
-
+
@@ -87,6 +77,7 @@
android:id="@+id/login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginStart="@dimen/size_50"
android:enabled="false"
android:text="@string/action_sign_in"
app:layout_constraintBottom_toBottomOf="parent"
@@ -97,6 +88,7 @@
android:id="@+id/register"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
+ android:layout_marginEnd="@dimen/size_50"
android:enabled="true"
android:text="@string/action_register"
app:layout_constraintBottom_toBottomOf="parent"
diff --git a/app/src/main/res/layout/activity_register.xml b/app/src/main/res/layout/activity_register.xml
index 363b50c..6871723 100644
--- a/app/src/main/res/layout/activity_register.xml
+++ b/app/src/main/res/layout/activity_register.xml
@@ -6,6 +6,8 @@
android:layout_height="match_parent"
tools:context=".ui.register.RegisterActivity">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/titlebar_layout.xml b/app/src/main/res/layout/titlebar_layout.xml
new file mode 100644
index 0000000..89846e4
--- /dev/null
+++ b/app/src/main/res/layout/titlebar_layout.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values-en-rUS/dimens.xml b/app/src/main/res/values-en-rUS/dimens.xml
index 12ace6f..02032e9 100644
--- a/app/src/main/res/values-en-rUS/dimens.xml
+++ b/app/src/main/res/values-en-rUS/dimens.xml
@@ -1,4 +1,7 @@
+ 16dp
+ 16dp
8dp
+ 50dp
\ No newline at end of file
diff --git a/app/src/main/res/values-en-rUS/strings.xml b/app/src/main/res/values-en-rUS/strings.xml
index ba124ab..2da10ad 100644
--- a/app/src/main/res/values-en-rUS/strings.xml
+++ b/app/src/main/res/values-en-rUS/strings.xml
@@ -18,4 +18,7 @@
Register
back
system config
+ please input confirm password
+ please input email
+ please input phone
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rCN/dimens.xml b/app/src/main/res/values-zh-rCN/dimens.xml
index 12ace6f..02032e9 100644
--- a/app/src/main/res/values-zh-rCN/dimens.xml
+++ b/app/src/main/res/values-zh-rCN/dimens.xml
@@ -1,4 +1,7 @@
+ 16dp
+ 16dp
8dp
+ 50dp
\ No newline at end of file
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index adb8218..9715920 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -18,4 +18,7 @@
注册
返回
配置
+ 请输入确认密码
+ 请输入邮箱
+ 请输入手机号
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 2bd968b..352a632 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -2,6 +2,6 @@
16dp
16dp
- 16dp
8dp
+ 50dp
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index dcd2f93..b4fb84c 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -18,6 +18,9 @@
Register
back
system config
+ please input confirm password
+ please input email
+ please input phone