feat: 初始化界面
This commit is contained in:
parent
9bbe6ead62
commit
3b0581c621
@ -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'
|
||||
|
@ -9,12 +9,9 @@
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/AppTheme">
|
||||
<activity android:name=".activity.MainActivity">
|
||||
|
||||
</activity>
|
||||
<activity android:name=".activity.HomeActivity">
|
||||
|
||||
</activity>
|
||||
<activity android:name=".activity.MainActivity"></activity>
|
||||
<activity android:name=".activity.ManagementFragment"/>
|
||||
<activity android:name=".activity.HomeActivity"></activity>
|
||||
<activity android:name=".activity.LoginActivity">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,10 @@ 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.RegisterFragment;
|
||||
import com.example.myapplication.fragment.TreasureFragment;
|
||||
import com.gyf.immersionbar.ImmersionBar;
|
||||
|
||||
@ -28,6 +30,8 @@ public class ManagementFragment extends BaseActivity {
|
||||
private FindFragment findFragment;//发现的fragment
|
||||
private RecordFragment recordFragment;//纪录的fragment
|
||||
private TreasureFragment treasureFragment;//寻宝的fragment
|
||||
private RegisterFragment registerFragment;//注册的fragment
|
||||
private ForgetPawFragment forgetPawFragment;//忘记密码fragment
|
||||
|
||||
|
||||
@Override
|
||||
@ -56,6 +60,10 @@ public class ManagementFragment extends BaseActivity {
|
||||
fragmentTransaction.hide(recordFragment);
|
||||
if (treasureFragment != null)
|
||||
fragmentTransaction.hide(treasureFragment);
|
||||
if (registerFragment != null)
|
||||
fragmentTransaction.hide(registerFragment);
|
||||
if (forgetPawFragment != null)
|
||||
fragmentTransaction.hide(forgetPawFragment);
|
||||
}
|
||||
|
||||
public void selectorFragment(int i) {
|
||||
@ -97,6 +105,22 @@ 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;
|
||||
}
|
||||
fragmentTransaction.commit();
|
||||
|
||||
@ -118,9 +142,16 @@ 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;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
private void setZtlTextColor() {
|
||||
ImmersionBar.with(this)
|
||||
.statusBarDarkFont(true, 0.2f) //原理:如果当前设备支持状态栏字体变色,会设置状态栏字体为黑色,如果当前设备不支持状态栏字体变色,会使当前状态栏加上透明度,否则不执行透明度
|
||||
|
@ -13,22 +13,24 @@ 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) {
|
||||
View inflate = inflater.inflate(getLayout(), container, false);
|
||||
mview = inflater.inflate(getLayout(), container, false);
|
||||
|
||||
initMvp();
|
||||
initView();
|
||||
initData();
|
||||
return inflate;
|
||||
return mview;
|
||||
}
|
||||
|
||||
protected void initMvp() {
|
||||
@ -70,6 +72,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
|
||||
protected void initView() {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -0,0 +1,5 @@
|
||||
package com.example.myapplication.bean;
|
||||
|
||||
public class TaskSpecificationInfo {
|
||||
|
||||
}
|
@ -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();
|
||||
}
|
||||
}
|
@ -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();
|
||||
}
|
||||
|
||||
}
|
5
app/src/main/res/drawable/select_check.xml
Normal file
5
app/src/main/res/drawable/select_check.xml
Normal 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>
|
5
app/src/main/res/drawable/shape_login.xml
Normal file
5
app/src/main/res/drawable/shape_login.xml
Normal 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>
|
@ -84,9 +84,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 +96,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 +115,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>
|
146
app/src/main/res/layout/fragment_forget_paw.xml
Normal file
146
app/src/main/res/layout/fragment_forget_paw.xml
Normal file
@ -0,0 +1,146 @@
|
||||
<?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"
|
||||
android:background="@mipmap/bg"
|
||||
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>
|
206
app/src/main/res/layout/fragment_register.xml
Normal file
206
app/src/main/res/layout/fragment_register.xml
Normal file
@ -0,0 +1,206 @@
|
||||
<?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"
|
||||
android:background="@mipmap/bg"
|
||||
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>
|
28
app/src/main/res/layout/register_title.xml
Normal file
28
app/src/main/res/layout/register_title.xml
Normal 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>
|
BIN
app/src/main/res/mipmap-xxhdpi/checkbox.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/checkbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 B |
BIN
app/src/main/res/mipmap-xxhdpi/checkbox_checked.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/checkbox_checked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 232 B |
BIN
app/src/main/res/mipmap-xxhdpi/icon_goback.png
Normal file
BIN
app/src/main/res/mipmap-xxhdpi/icon_goback.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 172 B |
BIN
app/src/main/res/mipmap-xxxhdpi/checkbox.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/checkbox.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 B |
BIN
app/src/main/res/mipmap-xxxhdpi/checkbox_checked.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/checkbox_checked.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 232 B |
BIN
app/src/main/res/mipmap-xxxhdpi/icon_goback.png
Normal file
BIN
app/src/main/res/mipmap-xxxhdpi/icon_goback.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 172 B |
@ -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>
|
||||
|
@ -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>
|
@ -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">–>-->
|
||||
<!-- <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>
|
Loading…
x
Reference in New Issue
Block a user