feat: 初始化界面

This commit is contained in:
md
2021-05-26 18:45:48 +08:00
parent 9bbe6ead62
commit 3b0581c621
23 changed files with 584 additions and 25 deletions

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

@@ -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>

View 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>

View 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>

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: 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: 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>