解决冲突

This commit is contained in:
wds 2021-05-26 19:01:46 +08:00
commit b0526a0eb1
35 changed files with 628 additions and 43 deletions

2
.idea/misc.xml generated
View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">

View File

@ -20,10 +20,10 @@ android {
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
// compileOptions {
// sourceCompatibility JavaVersion.VERSION_1_8
// targetCompatibility JavaVersion.VERSION_1_8
// }
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
@ -34,6 +34,7 @@ dependencies {
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.1.0'
implementation 'androidx.navigation:navigation-ui:2.1.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

View File

@ -12,6 +12,14 @@
android:supportsRtl="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme.NoActionBar">
<activity android:name=".activity.LoginActivity">
</activity>
<activity android:name=".activity.HomeActivity">
</activity>
<activity android:name=".activity.ManagementFragment"></activity>
<activity android:name=".activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -19,11 +27,6 @@
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.HomeActivity">
</activity>
<activity android:name=".activity.LoginActivity">
</activity>
<activity android:name=".activity.ManagementFragment"></activity>
</application>

View File

@ -1,12 +1,23 @@
package com.example.myapplication.activity;
import android.content.Intent;
import android.view.View;
import android.widget.EditText;
import android.widget.TextView;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseActivity;
/**
* 登录页
*/
public class LoginActivity extends BaseActivity {
public class LoginActivity extends BaseActivity implements View.OnClickListener {
private TextView tvRegister;
private android.widget.EditText etLoginName;
private android.widget.EditText etLoginPaw;
private TextView tvForgetPaw;
private TextView tvLogin;
@Override
protected int getLayout() {
return R.layout.activity_login;
@ -20,5 +31,29 @@ public class LoginActivity extends BaseActivity {
@Override
protected void initView() {
super.initView();
tvRegister = (TextView) findViewById(R.id.tv_register);
etLoginName = (EditText) findViewById(R.id.et_login_name);
etLoginPaw = (EditText) findViewById(R.id.et_login_paw);
tvForgetPaw = (TextView) findViewById(R.id.tv_forget_paw);
tvLogin = (TextView) findViewById(R.id.tv_login);
tvRegister.setOnClickListener(this);
tvForgetPaw.setOnClickListener(this);
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.tv_register:
Intent register = new Intent(this, ManagementFragment.class);
register.putExtra("tag", 5);
startActivity(register);
break;
case R.id.tv_forget_paw:
Intent forgetPaw = new Intent(this, ManagementFragment.class);
forgetPaw.putExtra("tag", 6);
startActivity(forgetPaw);
break;
}
}
}

View File

@ -4,6 +4,8 @@ package com.example.myapplication.activity;
import androidx.core.app.ActivityCompat;
import android.Manifest;
import android.content.Intent;
import android.os.CountDownTimer;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseActivity;
@ -18,6 +20,19 @@ public class MainActivity extends BaseActivity {
@Override
protected void initData() {
super.initData();
new CountDownTimer(3000, 1000) {
@Override
public void onTick(long l) {
}
@Override
public void onFinish() {
Intent intent = new Intent(MainActivity.this, HomeActivity.class);
startActivity(intent);
finish();
}
}.start();
}
private void initPermission() {
String[] pers = {

View File

@ -7,10 +7,13 @@ import android.view.KeyEvent;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseActivity;
import com.example.myapplication.fragment.FindFragment;
import com.example.myapplication.fragment.ForgetPawFragment;
import com.example.myapplication.fragment.MineFragment;
import com.example.myapplication.fragment.RecordFragment;
import com.example.myapplication.fragment.TaskExplainFragment;
import com.example.myapplication.fragment.TaskPrefectureFragment;
import com.example.myapplication.fragment.RegisterFragment;
import com.example.myapplication.fragment.TreasureFragment;
import com.gyf.immersionbar.ImmersionBar;
@ -33,6 +36,10 @@ public class ManagementFragment extends BaseActivity {
private TaskPrefectureFragment taskPrefectureFragment;//发现-任务专区的fragment
private TaskExplainFragment taskExplainFragment;//发现-任务说明的fragment
private RegisterFragment registerFragment;//注册的fragment
private ForgetPawFragment forgetPawFragment;//忘记密码fragment
@Override
protected int getLayout() {
@ -60,10 +67,17 @@ public class ManagementFragment extends BaseActivity {
fragmentTransaction.hide(recordFragment);
if (treasureFragment != null)
fragmentTransaction.hide(treasureFragment);
if (taskPrefectureFragment!=null)
fragmentTransaction.hide(taskPrefectureFragment);
if (taskExplainFragment!=null)
fragmentTransaction.hide(taskExplainFragment);
if (registerFragment != null)
fragmentTransaction.hide(registerFragment);
if (forgetPawFragment != null)
fragmentTransaction.hide(forgetPawFragment);
}
public void selectorFragment(int i) {
@ -105,25 +119,42 @@ public class ManagementFragment extends BaseActivity {
fragmentTransaction.show(treasureFragment);
}
break;
case 5:
if (registerFragment == null) {
registerFragment = new RegisterFragment();
fragmentTransaction.add(R.id.frame_layout, registerFragment);
} else {
fragmentTransaction.show(registerFragment);
}
break;
case 6:
if (forgetPawFragment == null) {
forgetPawFragment = new ForgetPawFragment();
fragmentTransaction.add(R.id.frame_layout, forgetPawFragment);
} else {
fragmentTransaction.show(forgetPawFragment);
}
break;
case 7:
if (taskPrefectureFragment==null){
taskPrefectureFragment=new TaskPrefectureFragment();
fragmentTransaction.add(R.id.frame_layout,taskPrefectureFragment);
}else {
if (taskPrefectureFragment == null) {
taskPrefectureFragment = new TaskPrefectureFragment();
fragmentTransaction.add(R.id.frame_layout, taskPrefectureFragment);
} else {
fragmentTransaction.show(taskPrefectureFragment);
}
break;
case 8:
if (taskExplainFragment==null){
taskExplainFragment=new TaskExplainFragment();
fragmentTransaction.add(R.id.frame_layout,taskExplainFragment);
}else {
if (taskExplainFragment == null) {
taskExplainFragment = new TaskExplainFragment();
fragmentTransaction.add(R.id.frame_layout, taskExplainFragment);
} else {
fragmentTransaction.show(taskExplainFragment);
}
break;
}
fragmentTransaction.commit();
break;
}
fragmentTransaction.commit();
}
}
@Override
@ -142,6 +173,12 @@ public class ManagementFragment extends BaseActivity {
case 4:
treasureFragment.onActivityResult(requestCode, resultCode, data);
break;
case 5:
registerFragment.onActivityResult(requestCode, resultCode, data);
break;
case 6:
forgetPawFragment.onActivityResult(requestCode, resultCode, data);
break;
case 7:
taskPrefectureFragment.onActivityResult(requestCode, resultCode, data);
break;
@ -150,10 +187,12 @@ public class ManagementFragment extends BaseActivity {
break;
}
}
private void setZtlTextColor() {
ImmersionBar.with(this)
.statusBarDarkFont(true, 0.2f) //原理如果当前设备支持状态栏字体变色会设置状态栏字体为黑色如果当前设备不支持状态栏字体变色会使当前状态栏加上透明度否则不执行透明度
.init();
}
}

View File

@ -44,10 +44,10 @@ public abstract class BaseActivity extends AppCompatActivity {
alertDialog.getWindow().setBackgroundDrawable(new ColorDrawable());
alertDialog.setCancelable(false);
alertDialog.setOnKeyListener((dialog, keyCode, event) -> {
if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK)
if (keyCode == KeyEvent.KEYCODE_SEARCH || keyCode == KeyEvent.KEYCODE_BACK)
return true;
return false;
});
});
//loading样式
//View view = LayoutInflater.from(this).inflate(R.layout.loading_alert, null);
//alertDialog.setView(view);

View File

@ -13,14 +13,15 @@ import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment;
import com.example.myapplication.R;
public abstract class BaseFragment extends Fragment {
private AlertDialog alertDialog;
public View mView;
@Nullable
@Override
public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
@ -29,6 +30,7 @@ public abstract class BaseFragment extends Fragment {
initView();
initData();
return mView;
}
protected void initMvp() {
@ -70,6 +72,7 @@ public abstract class BaseFragment extends Fragment {
protected void initView() {
}
@Override

View File

@ -0,0 +1,5 @@
package com.example.myapplication.bean;
public class TaskSpecificationInfo {
}

View File

@ -0,0 +1,32 @@
package com.example.myapplication.fragment;
import android.os.Bundle;
import androidx.fragment.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseFragment;
/**
*忘记密码页面
*/
public class ForgetPawFragment extends BaseFragment {
@Override
protected int getLayout() {
return R.layout.fragment_forget_paw;
}
@Override
protected void initView() {
super.initView();
}
@Override
protected void initData() {
super.initData();
}
}

View File

@ -0,0 +1,62 @@
package com.example.myapplication.fragment;
import android.view.View;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import com.example.myapplication.R;
import com.example.myapplication.base.BaseFragment;
/**
* 注册页面
*/
public class RegisterFragment extends BaseFragment {
private EditText etRegisterPhone;
private EditText etRegisterNote;
private TextView registerGetNote;
private EditText etRegisterReferrer;
private EditText etRegisterPaw;
private EditText etRegisterConfirmPaw;
private ImageView ivRegisterCheck;
private TextView haveGoLogin;
private TextView tvRegister;
private ImageView ivFinish;
@Override
protected int getLayout() {
return R.layout.fragment_register;
}
@Override
protected void initView() {
super.initView();
ivFinish =mView.findViewById(R.id.iv_finish);
etRegisterPhone = mView.findViewById(R.id.et_register_phone);
etRegisterNote = mView.findViewById(R.id.et_register_note);
registerGetNote = mView.findViewById(R.id.register_get_note);
etRegisterReferrer = mView.findViewById(R.id.et_register_referrer);
etRegisterPaw = mView.findViewById(R.id.et_register_paw);
etRegisterConfirmPaw = mView.findViewById(R.id.et_register_confirm_paw);
ivRegisterCheck = mView.findViewById(R.id.iv_register_check);
haveGoLogin = mView.findViewById(R.id.have_go_login);
tvRegister = mView.findViewById(R.id.tv_register);
ivFinish.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
getActivity().finish();
}
});
}
@Override
protected void initData() {
super.initData();
}
}

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@mipmap/checkbox" android:state_selected="false"/>
<item android:drawable="@mipmap/checkbox_checked" android:state_selected="true"/>
</selector>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/colorWhite"/>
<corners android:radius="50dp"/>
</shape>

View File

@ -4,7 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@mipmap/bg"
tools:context="activity.LoginActivity">
<TextView
@ -84,9 +83,9 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:buttonTint="@color/colorWhite"
android:text="免责声明"
android:scaleX="0.7"
android:scaleY="0.7"
android:text="免责声明"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintLeft_toLeftOf="@id/et_login_paw"
@ -96,14 +95,13 @@
android:id="@+id/tv_register"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginRight="10dp"
android:text="注册"
android:textColor="@color/colorWhite"
android:textSize="12sp"
app:layout_constraintRight_toLeftOf="@id/tv_forget_paw"
app:layout_constraintTop_toBottomOf="@id/et_login_paw"
android:layout_marginTop="8dp"
/>
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
<TextView
android:id="@+id/tv_forget_paw"
@ -116,4 +114,15 @@
app:layout_constraintRight_toRightOf="@id/et_login_paw"
app:layout_constraintTop_toBottomOf="@id/et_login_paw" />
<TextView
android:id="@+id/tv_login"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_login"
android:gravity="center"
android:text="登录"
android:textColor="@color/colorPrimaryDark"
app:layout_constraintLeft_toLeftOf="@id/cb_disclaimer"
app:layout_constraintTop_toBottomOf="@id/tv_forget_paw"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragment.ForgetPawFragment">
<include layout="@layout/register_title" android:id="@+id/forgetPaw"/>
<TextView
android:id="@+id/fragment_tv_forgetPaw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="密码找回/修改"
android:textSize="35sp"
android:textColor="@color/colorWhite"
app:layout_constraintTop_toBottomOf="@id/forgetPaw"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginTop="35dp"
android:layout_marginLeft="20dp"
/>
<TextView
android:id="@+id/forgetPaw_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="手机号"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/fragment_tv_forgetPaw"
app:layout_constraintLeft_toLeftOf="@id/fragment_tv_forgetPaw"
/>
<EditText
android:id="@+id/et_forgetPaw_phone"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="11为手机号码"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/forgetPaw_phone"
app:layout_constraintTop_toBottomOf="@id/forgetPaw_phone" />
<TextView
android:id="@+id/forgetPaw_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="短信验证码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_phone"
app:layout_constraintLeft_toLeftOf="@id/et_forgetPaw_phone"
/>
<EditText
android:id="@+id/et_forgetPaw_note"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="6为短信验证"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/forgetPaw_note"
app:layout_constraintTop_toBottomOf="@id/forgetPaw_note" />
<TextView
android:id="@+id/forgetPaw_get_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="获取短信验证码"
android:textSize="14sp"
android:textColor="@color/colorWhite"
app:layout_constraintTop_toTopOf="@id/et_forgetPaw_note"
app:layout_constraintBottom_toBottomOf="@id/et_forgetPaw_note"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="30dp"/>
<TextView
android:id="@+id/forgetPaw_paw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="密码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_note"
app:layout_constraintLeft_toLeftOf="@id/et_forgetPaw_note"
/>
<EditText
android:id="@+id/et_forgetPaw_paw"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="6-20位密码"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/forgetPaw_paw"
app:layout_constraintTop_toBottomOf="@id/forgetPaw_paw"/>
<TextView
android:id="@+id/forgetPaw_confirm_paw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="确认密码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_paw"
app:layout_constraintLeft_toLeftOf="@id/et_forgetPaw_paw"
/>
<EditText
android:id="@+id/et_forgetPaw_confirm_paw"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="请再次输入一遍密码"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/forgetPaw_confirm_paw"
app:layout_constraintTop_toBottomOf="@id/forgetPaw_confirm_paw"/>
<TextView
android:id="@+id/tv_forgetPaw"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_login"
android:gravity="center"
android:text="提交"
android:textSize="20dp"
android:textColor="@color/colorPrimaryDark"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/et_forgetPaw_confirm_paw"
app:layout_constraintRight_toRightOf="parent"
/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,205 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:context=".fragment.RegisterFragment">
<include layout="@layout/register_title"
android:id="@+id/regs_title"/>
<TextView
android:id="@+id/register_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="37dp"
android:layout_marginTop="30dp"
android:text="Welcome"
android:textColor="@color/colorWhite"
android:textSize="30sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/regs_title" />
<TextView
android:id="@+id/register_desc"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="35dp"
android:text="注册地图寻宝"
android:textColor="@color/colorWhite"
android:textSize="35sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@id/register_title" />
<TextView
android:id="@+id/register_phone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="25dp"
android:text="手机号"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/register_desc"
app:layout_constraintLeft_toLeftOf="@id/register_desc"
/>
<EditText
android:id="@+id/et_register_phone"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="11为手机号码"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/register_phone"
app:layout_constraintTop_toBottomOf="@id/register_phone" />
<TextView
android:id="@+id/register_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="短信验证码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_register_phone"
app:layout_constraintLeft_toLeftOf="@id/et_register_phone"
/>
<EditText
android:id="@+id/et_register_note"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="6为短信验证"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/register_note"
app:layout_constraintTop_toBottomOf="@id/register_note" />
<TextView
android:id="@+id/register_get_note"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="获取短信验证码"
android:textSize="14sp"
android:textColor="@color/colorWhite"
app:layout_constraintTop_toTopOf="@id/et_register_note"
app:layout_constraintBottom_toBottomOf="@id/et_register_note"
app:layout_constraintRight_toRightOf="parent"
android:layout_marginRight="30dp"
/>
<TextView
android:id="@+id/register_referrer"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="推荐人"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_register_note"
app:layout_constraintLeft_toLeftOf="@id/et_register_note"
/>
<EditText
android:id="@+id/et_register_referrer"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="推荐人(编码/邮箱/手机号)"
android:textSize="15sp"
android:paddingBottom="20dp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/register_referrer"
app:layout_constraintTop_toBottomOf="@id/register_referrer"/>
<TextView
android:id="@+id/register_paw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="密码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_register_referrer"
app:layout_constraintLeft_toLeftOf="@id/et_register_referrer"
/>
<EditText
android:id="@+id/et_register_paw"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="6-20位密码"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/register_paw"
app:layout_constraintTop_toBottomOf="@id/register_paw"/>
<TextView
android:id="@+id/register_confirm_paw"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:text="确认密码"
android:textColor="@color/colorWhite"
android:textSize="14sp"
app:layout_constraintTop_toBottomOf="@id/et_register_paw"
app:layout_constraintLeft_toLeftOf="@id/et_register_paw"
/>
<EditText
android:id="@+id/et_register_confirm_paw"
android:layout_width="300dp"
android:layout_height="wrap_content"
android:hint="请再次输入一遍密码"
android:paddingBottom="20dp"
android:textSize="15sp"
android:textColorHint="@color/colorTransparent"
android:textCursorDrawable="@drawable/text_color"
android:theme="@style/MyEditText"
app:layout_constraintLeft_toLeftOf="@id/register_confirm_paw"
app:layout_constraintTop_toBottomOf="@id/register_confirm_paw"/>
<ImageView
android:id="@+id/iv_register_check"
android:layout_width="20dp"
android:layout_height="20dp"
android:background="@drawable/select_check"
app:layout_constraintTop_toBottomOf="@id/et_register_confirm_paw"
app:layout_constraintLeft_toLeftOf="@id/et_register_confirm_paw"
android:layout_marginTop="5dp"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="免责声明"
android:textColor="@color/colorWhite"
app:layout_constraintTop_toTopOf="@id/iv_register_check"
app:layout_constraintLeft_toRightOf="@id/iv_register_check"
app:layout_constraintBottom_toBottomOf="@id/iv_register_check"
android:layout_marginLeft="2dp"/>
<TextView
android:id="@+id/have_go_login"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="已有账号,去登录"
android:textColor="@color/colorWhite"
app:layout_constraintTop_toTopOf="@id/iv_register_check"
app:layout_constraintRight_toRightOf="@id/et_register_confirm_paw"
app:layout_constraintBottom_toBottomOf="@id/iv_register_check"/>
<TextView
android:id="@+id/tv_register"
android:layout_width="300dp"
android:layout_height="50dp"
android:layout_marginTop="20dp"
android:background="@drawable/shape_login"
android:gravity="center"
android:text="注册"
android:textSize="20dp"
android:textColor="@color/colorPrimaryDark"
app:layout_constraintLeft_toLeftOf="@id/iv_register_check"
app:layout_constraintTop_toBottomOf="@id/iv_register_check"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@color/colorPrimaryBlue"
android:paddingTop="20dp"
android:layout_height="wrap_content">
<ImageView
android:id="@+id/iv_finish"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_marginLeft="10dp"
app:layout_constraintBottom_toBottomOf="parent"
android:background="@mipmap/icon_goback"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="注册"
android:textColor="@color/colorWhite"
android:textSize="18sp"
android:id="@+id/title_register"
app:layout_constraintLeft_toRightOf="@id/iv_finish"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginLeft="20dp"/>
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 600 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 316 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 271 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 426 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 269 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 282 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 320 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 B

View File

@ -2,6 +2,7 @@
<resources>
<color name="colorPrimary">#6200EE</color>
<color name="colorPrimaryDark">#3700B3</color>
<color name="colorPrimaryBlue">#03A9F4</color>
<color name="colorAccent">#03DAC5</color>
<color name="colorBack">#000000</color>
<color name="colorGrey">#FAFAFA</color>

View File

@ -9,4 +9,6 @@
<string name="hello_first_fragment">Hello first fragment</string>
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
<!-- TODO: Remove or change this placeholder text -->
<string name="hello_blank_fragment">Hello blank fragment</string>
</resources>

View File

@ -15,20 +15,10 @@
<style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" />
<style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" />
<!-- <style name="MyEditText" parent="Theme.AppCompat.Light">&ndash;&gt;-->
<!-- <item name="colorControlNormal">@color/colorWhite</item>-->
<!-- </style>-->
<!-- 设置Editext下划线颜色-->
<style name="MyEditText" parent="Theme.AppCompat.Light">
<item name="colorControlNormal">@android:color/darker_gray</item>
<item name="colorControlActivated">@android:color/darker_gray</item>
</style>
<!-- 设置Checkbox边框大小-->
<!-- <style-->
<!-- name="MyCheckBox"-->
<!-- parent="@android:style/Widget.CompoundButton.CheckBox">-->
<!-- <item name="android:button">-->
<!-- -->
<!-- </item>-->
<!-- </style>-->
</resources>