优化
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 766 B After Width: | Height: | Size: 1.8 KiB |
13
app/src/main/res/drawable/ic_home_selector.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- 选中状态 -->
|
||||
<item
|
||||
android:state_checked="true"
|
||||
android:drawable="@drawable/selected_home" />
|
||||
|
||||
<!-- 未选中状态 -->
|
||||
<item
|
||||
android:drawable="@drawable/home" />
|
||||
|
||||
</selector>
|
||||
13
app/src/main/res/drawable/ic_mine_selector.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- 选中状态 -->
|
||||
<item
|
||||
android:state_checked="true"
|
||||
android:drawable="@drawable/selected_mine" />
|
||||
|
||||
<!-- 未选中状态 -->
|
||||
<item
|
||||
android:drawable="@drawable/mine" />
|
||||
|
||||
</selector>
|
||||
13
app/src/main/res/drawable/ic_shop_selector.xml
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<!-- 选中状态 -->
|
||||
<item
|
||||
android:state_checked="true"
|
||||
android:drawable="@drawable/selected_shop" />
|
||||
|
||||
<!-- 未选中状态 -->
|
||||
<item
|
||||
android:drawable="@drawable/shop" />
|
||||
|
||||
</selector>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 2.8 KiB |
|
Before Width: | Height: | Size: 3.6 KiB After Width: | Height: | Size: 36 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 5.2 KiB |
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 3.7 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 5.5 KiB |
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 4.1 KiB |
|
Before Width: | Height: | Size: 933 B After Width: | Height: | Size: 2.1 KiB |
@@ -7,16 +7,27 @@
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<!-- 页面内容区域:用于切换 Fragment -->
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/nav_host_fragment"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
<FrameLayout
|
||||
android:id="@+id/root_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:navGraph="@navigation/nav_graph"
|
||||
app:defaultNavHost="true" />
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<!-- 3个Tab NavHost 都 add 到这里 -->
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/tab_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"/>
|
||||
|
||||
<!-- 全局页面覆盖层(login/recharge等) -->
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/global_container"
|
||||
android:name="androidx.navigation.fragment.NavHostFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:visibility="gone" />
|
||||
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 底部导航栏 -->
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
@@ -27,4 +38,4 @@
|
||||
app:itemIconTint="@null"
|
||||
app:itemTextColor="@color/nav_text_color"/>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
5
app/src/main/res/layout/fragment_empty.xml
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@android:color/transparent"/>
|
||||
@@ -53,7 +53,7 @@
|
||||
android:textColor="#1B1F1A"/>
|
||||
|
||||
<EditText
|
||||
android:id="@+id/et_username"
|
||||
android:id="@+id/et_email"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_height="52dp">
|
||||
<EditText
|
||||
android:id="@+id/et_password"
|
||||
android:id="@+id/et_confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="14sp"
|
||||
@@ -95,7 +95,7 @@
|
||||
android:background="@null"
|
||||
android:inputType="textPassword" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_toggle"
|
||||
android:id="@+id/iv_confirm_toggle"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:padding="16dp"
|
||||
@@ -105,7 +105,7 @@
|
||||
</RelativeLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/btn_login"
|
||||
android:id="@+id/nextstep"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="20dp"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<!-- 忘记密码验证码输入页面 -->
|
||||
<!-- 验证码输入页面 -->
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
@@ -59,6 +59,17 @@
|
||||
android:text="Enter email verification code"
|
||||
android:textColor="#1B1F1A"/>
|
||||
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:text="Please enter the verification code sent to your email"
|
||||
android:textColor="#02BEAC"/>
|
||||
|
||||
|
||||
<!-- 验证码输入框 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_code_container"
|
||||
|
||||
@@ -79,8 +79,8 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="44dp"
|
||||
android:src="@drawable/ai_dialogue"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
@@ -103,8 +103,8 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="44dp"
|
||||
android:src="@drawable/personalized_keyboard"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
@@ -127,8 +127,8 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="44dp"
|
||||
android:src="@drawable/chat_persona"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
@@ -151,8 +151,8 @@
|
||||
android:orientation="vertical">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_width="54dp"
|
||||
android:layout_height="44dp"
|
||||
android:src="@drawable/emotional_counseling"
|
||||
android:scaleType="fitCenter" />
|
||||
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
|
||||
<!-- 输入框 -->
|
||||
<EditText
|
||||
android:id="@+id/et_username"
|
||||
android:id="@+id/et_email"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="20dp"
|
||||
@@ -142,7 +142,7 @@
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_height="52dp">
|
||||
<EditText
|
||||
android:id="@+id/et_password"
|
||||
android:id="@+id/et_confirm_password"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:textSize="14sp"
|
||||
@@ -153,7 +153,7 @@
|
||||
android:textColorHint="#CBCBCB"
|
||||
android:inputType="textPassword" />
|
||||
<ImageView
|
||||
android:id="@+id/iv_toggle"
|
||||
android:id="@+id/iv_confirm_toggle"
|
||||
android:layout_width="52dp"
|
||||
android:layout_height="52dp"
|
||||
android:padding="16dp"
|
||||
@@ -161,9 +161,9 @@
|
||||
android:layout_centerVertical="true"
|
||||
android:src="@drawable/hide" />
|
||||
</RelativeLayout>
|
||||
<!-- 登录按钮 -->
|
||||
<!-- 下一步按钮 -->
|
||||
<TextView
|
||||
android:id="@+id/btn_login"
|
||||
android:id="@+id/btn_next_step"
|
||||
android:layout_width="315dp"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="20dp"
|
||||
@@ -172,7 +172,7 @@
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18sp"
|
||||
android:text="Login" />
|
||||
android:text="Next step" />
|
||||
|
||||
<com.google.android.flexbox.FlexboxLayout
|
||||
android:id="@+id/agreement_container"
|
||||
|
||||
120
app/src/main/res/layout/fragment_register_verify.xml
Normal file
@@ -0,0 +1,120 @@
|
||||
<!-- 验证码输入页面 -->
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rootCoordinator"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFFFFF"
|
||||
tools:context=".ui.login.RegisterVerifyFragment">
|
||||
<androidx.core.widget.NestedScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fillViewport="true"
|
||||
android:overScrollMode="never">
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_horizontal"
|
||||
android:orientation="vertical">
|
||||
<!-- 标题和返回 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical">
|
||||
<FrameLayout
|
||||
android:id="@+id/iv_close"
|
||||
android:layout_width="46dp"
|
||||
android:layout_height="46dp">
|
||||
<ImageView
|
||||
android:layout_width="13dp"
|
||||
android:layout_height="13dp"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/more_icons"
|
||||
android:rotation="180"
|
||||
android:scaleType="fitCenter" />
|
||||
</FrameLayout>
|
||||
</LinearLayout>
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="30dp"
|
||||
android:orientation="vertical">
|
||||
<!-- 标题 -->
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:text="Register"
|
||||
android:textColor="#1B1F1A"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:text="Enter email verification code"
|
||||
android:textColor="#1B1F1A"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_code_hint"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="13sp"
|
||||
android:textStyle="bold"
|
||||
android:text="Please enter the verification code sent to your email"
|
||||
android:textColor="#02BEAC"/>
|
||||
|
||||
<!-- 验证码输入框 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_code_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="18dp"
|
||||
android:gravity="center"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<com.example.myapplication.ui.common.CodeEditText
|
||||
android:id="@+id/et_code_1"
|
||||
style="@style/VerifyCodeBox" />
|
||||
|
||||
<com.example.myapplication.ui.common.CodeEditText
|
||||
android:id="@+id/et_code_2"
|
||||
style="@style/VerifyCodeBox" />
|
||||
|
||||
<com.example.myapplication.ui.common.CodeEditText
|
||||
android:id="@+id/et_code_3"
|
||||
style="@style/VerifyCodeBox" />
|
||||
|
||||
<com.example.myapplication.ui.common.CodeEditText
|
||||
android:id="@+id/et_code_4"
|
||||
style="@style/VerifyCodeBox" />
|
||||
|
||||
<com.example.myapplication.ui.common.CodeEditText
|
||||
android:id="@+id/et_code_5"
|
||||
style="@style/VerifyCodeBox" />
|
||||
|
||||
<com.example.myapplication.ui.common.CodeEditText
|
||||
android:id="@+id/et_code_6"
|
||||
style="@style/VerifyCodeBox" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/nextstep"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="52dp"
|
||||
android:layout_marginTop="20dp"
|
||||
android:background="@drawable/login_btn_bg"
|
||||
android:gravity="center"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="18sp"
|
||||
android:text="Next step" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
@@ -2,24 +2,15 @@
|
||||
<menu xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<item
|
||||
android:id="@+id/homeFragment"
|
||||
android:icon="@drawable/home_selector"
|
||||
android:title="Home" />
|
||||
android:id="@+id/home_graph"
|
||||
android:icon="@drawable/ic_home_selector"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/shopFragment"
|
||||
android:icon="@drawable/shop_selector"
|
||||
android:title="Shop" />
|
||||
|
||||
<!-- <item
|
||||
android:id="@+id/circleFragment"
|
||||
android:icon="@drawable/circle_selector"
|
||||
android:title="Circle" /> -->
|
||||
android:id="@+id/shop_graph"
|
||||
android:icon="@drawable/ic_shop_selector"/>
|
||||
|
||||
<item
|
||||
android:id="@+id/mineFragment"
|
||||
android:icon="@drawable/mine_selector"
|
||||
android:title="Mine" />
|
||||
android:id="@+id/mine_graph"
|
||||
android:icon="@drawable/ic_mine_selector" />
|
||||
|
||||
</menu>
|
||||
|
||||
|
||||
181
app/src/main/res/navigation/global_graph.xml
Normal file
@@ -0,0 +1,181 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/global_graph"
|
||||
app:startDestination="@id/globalEmptyFragment">
|
||||
|
||||
<!-- 一个空白起点,用来表示"没打开全局页" -->
|
||||
<fragment
|
||||
android:id="@+id/globalEmptyFragment"
|
||||
android:name="com.example.myapplication.ui.EmptyFragment"
|
||||
android:label="empty" />
|
||||
|
||||
<!-- 圈子 -->
|
||||
<fragment
|
||||
android:id="@+id/circleFragment"
|
||||
android:name="com.example.myapplication.ui.circle.CircleFragment"
|
||||
android:label="Circle"
|
||||
tools:layout="@layout/fragment_circle" />
|
||||
|
||||
<!-- 充值 -->
|
||||
<fragment
|
||||
android:id="@+id/rechargeFragment"
|
||||
android:name="com.example.myapplication.ui.recharge.RechargeFragment"
|
||||
android:label="Recharge"
|
||||
tools:layout="@layout/activity_recharge" />
|
||||
|
||||
<!-- 金币充值 -->
|
||||
<fragment
|
||||
android:id="@+id/goldCoinRechargeFragment"
|
||||
android:name="com.example.myapplication.ui.recharge.GoldCoinRechargeFragment"
|
||||
android:label="Gold Coin Recharge"
|
||||
tools:layout="@layout/gold_coin_recharge" />
|
||||
|
||||
<!-- 键盘详情 -->
|
||||
<fragment
|
||||
android:id="@+id/keyboardDetailFragment"
|
||||
android:name="com.example.myapplication.ui.keyboard.KeyboardDetailFragment"
|
||||
android:label="Keyboard Detail"
|
||||
tools:layout="@layout/keyboard_detail">
|
||||
<argument
|
||||
android:name="themeId"
|
||||
android:defaultValue="0"
|
||||
app:argType="integer" />
|
||||
</fragment>
|
||||
|
||||
<!-- 登录页面 -->
|
||||
<fragment
|
||||
android:id="@+id/loginFragment"
|
||||
android:name="com.example.myapplication.ui.login.LoginFragment"
|
||||
android:label="Login"
|
||||
tools:layout="@layout/fragment_login" />
|
||||
|
||||
<!-- 注册页面 -->
|
||||
<fragment
|
||||
android:id="@+id/registerFragment"
|
||||
android:name="com.example.myapplication.ui.login.RegisterFragment"
|
||||
android:label="Register"
|
||||
tools:layout="@layout/fragment_register" />
|
||||
|
||||
<!-- 忘记密码邮箱输入页面 -->
|
||||
<fragment
|
||||
android:id="@+id/forgetPasswordEmailFragment"
|
||||
android:name="com.example.myapplication.ui.login.ForgetPasswordEmailFragment"
|
||||
android:label="Forget Password Email"
|
||||
tools:layout="@layout/fragment_forget_password_email" />
|
||||
|
||||
<!-- 忘记密码验证码输入页面 -->
|
||||
<fragment
|
||||
android:id="@+id/forgetPasswordVerifyFragment"
|
||||
android:name="com.example.myapplication.ui.login.ForgetPasswordVerifyFragment"
|
||||
android:label="Forget Password Verify"
|
||||
tools:layout="@layout/fragment_forget_password_verify" />
|
||||
|
||||
<!-- 注册账号验证码输入页面 -->
|
||||
<fragment
|
||||
android:id="@+id/registerVerifyFragment"
|
||||
android:name="com.example.myapplication.ui.login.RegisterVerifyFragment"
|
||||
android:label="Register Verify"
|
||||
tools:layout="@layout/fragment_register_verify" />
|
||||
|
||||
<!-- 忘记密码重置密码页面 -->
|
||||
<fragment
|
||||
android:id="@+id/forgetPasswordResetFragment"
|
||||
android:name="com.example.myapplication.ui.login.ForgetPasswordResetFragment"
|
||||
android:label="Forget Password Reset"
|
||||
tools:layout="@layout/fragment_forget_password_reset" />
|
||||
|
||||
<!-- 充值跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_rechargeFragment"
|
||||
app:destination="@id/rechargeFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 金币充值跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_goldCoinRechargeFragment"
|
||||
app:destination="@id/goldCoinRechargeFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 键盘详情跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_keyboardDetailFragment"
|
||||
app:destination="@id/keyboardDetailFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 登录跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_loginFragment"
|
||||
app:destination="@id/loginFragment"
|
||||
app:popUpTo="@id/loginFragment"
|
||||
app:popUpToInclusive="true"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 忘记密码流程跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_forgetPasswordEmailFragment"
|
||||
app:destination="@id/forgetPasswordEmailFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_forgetPasswordEmailFragment_to_forgetPasswordVerifyFragment"
|
||||
app:destination="@id/forgetPasswordVerifyFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_forgetPasswordVerifyFragment_to_forgetPasswordResetFragment"
|
||||
app:destination="@id/forgetPasswordResetFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 注册流程跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_registerFragment_to_registerVerifyFragment"
|
||||
app:destination="@id/registerVerifyFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 从登录页到注册页 -->
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_registerFragment"
|
||||
app:destination="@id/registerFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<!-- 全局登录跳转(用于忘记密码流程) -->
|
||||
<action
|
||||
android:id="@+id/action_global_loginFragment_from_forget_password"
|
||||
app:destination="@id/loginFragment"
|
||||
app:popUpTo="@id/loginFragment"
|
||||
app:popUpToInclusive="true"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
</navigation>
|
||||
14
app/src/main/res/navigation/home_graph.xml
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/home_graph"
|
||||
app:startDestination="@id/homeFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/homeFragment"
|
||||
android:name="com.example.myapplication.ui.home.HomeFragment"
|
||||
android:label="Home"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
</navigation>
|
||||
|
||||
71
app/src/main/res/navigation/mine_graph.xml
Normal file
@@ -0,0 +1,71 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/mine_graph"
|
||||
app:startDestination="@id/mineFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/mineFragment"
|
||||
android:name="com.example.myapplication.ui.mine.MineFragment"
|
||||
android:label="Mine"
|
||||
tools:layout="@layout/fragment_mine">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_personalSettings"
|
||||
app:destination="@id/PersonalSettings"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_mykeyboard"
|
||||
app:destination="@id/MyKeyboard"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_feedbackFragment"
|
||||
app:destination="@id/feedbackFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_notificationFragment"
|
||||
app:destination="@id/notificationFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/PersonalSettings"
|
||||
android:name="com.example.myapplication.ui.mine.myotherpages.PersonalSettings"
|
||||
android:label="Setting"
|
||||
tools:layout="@layout/personal_settings" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/MyKeyboard"
|
||||
android:name="com.example.myapplication.ui.keyboard.MyKeyboard"
|
||||
android:label="Keyboard"
|
||||
tools:layout="@layout/my_keyboard" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/feedbackFragment"
|
||||
android:name="com.example.myapplication.ui.mine.myotherpages.FeedbackFragment"
|
||||
android:label="Feedback"
|
||||
tools:layout="@layout/feedback_fragment" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/notificationFragment"
|
||||
android:name="com.example.myapplication.ui.mine.myotherpages.NotificationFragment"
|
||||
android:label="Notification"
|
||||
tools:layout="@layout/notification_fragment" />
|
||||
|
||||
</navigation>
|
||||
@@ -3,285 +3,11 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/nav_graph"
|
||||
app:startDestination="@id/homeFragment">
|
||||
app:startDestination="@id/home_graph">
|
||||
|
||||
<!-- 首页 -->
|
||||
<fragment
|
||||
android:id="@+id/homeFragment"
|
||||
android:name="com.example.myapplication.ui.home.HomeFragment"
|
||||
android:label="Home"
|
||||
tools:layout="@layout/fragment_home" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_global_homeFragment"
|
||||
app:destination="@id/homeFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
<!-- 三个 Tab:独立 back stack -->
|
||||
<include app:graph="@navigation/home_graph" />
|
||||
<include app:graph="@navigation/shop_graph" />
|
||||
<include app:graph="@navigation/mine_graph" />
|
||||
|
||||
|
||||
<!-- 商城 -->
|
||||
<fragment
|
||||
android:id="@+id/shopFragment"
|
||||
android:name="com.example.myapplication.ui.shop.ShopFragment"
|
||||
android:label="Shop"
|
||||
tools:layout="@layout/fragment_shop">
|
||||
<action
|
||||
android:id="@+id/action_shopfragment_to_myskin"
|
||||
app:destination="@id/MySkin"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_shopfragment_to_searchfragment"
|
||||
app:destination="@id/searchFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
</fragment>
|
||||
|
||||
<!-- 圈子 -->
|
||||
<fragment
|
||||
android:id="@+id/circleFragment"
|
||||
android:name="com.example.myapplication.ui.circle.CircleFragment"
|
||||
android:label="Circle"
|
||||
tools:layout="@layout/fragment_circle" />
|
||||
|
||||
<!-- 我的 -->
|
||||
<fragment
|
||||
android:id="@+id/mineFragment"
|
||||
android:name="com.example.myapplication.ui.mine.MineFragment"
|
||||
android:label="Mine"
|
||||
tools:layout="@layout/fragment_mine">
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_personalSettings"
|
||||
app:destination="@id/PersonalSettings"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_mykeyboard"
|
||||
app:destination="@id/MyKeyboard"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_feedbackFragment"
|
||||
app:destination="@id/feedbackFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_notificationFragment"
|
||||
app:destination="@id/notificationFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
</fragment>
|
||||
|
||||
<!-- 充值 -->
|
||||
<fragment
|
||||
android:id="@+id/rechargeFragment"
|
||||
android:name="com.example.myapplication.ui.recharge.RechargeFragment"
|
||||
android:label="Recharge"
|
||||
tools:layout="@layout/activity_recharge" />
|
||||
|
||||
<!-- 金币充值 -->
|
||||
<fragment
|
||||
android:id="@+id/goldCoinRechargeFragment"
|
||||
android:name="com.example.myapplication.ui.recharge.GoldCoinRechargeFragment"
|
||||
android:label="Gold Coin Recharge"
|
||||
tools:layout="@layout/gold_coin_recharge" />
|
||||
|
||||
<!-- 充值全局跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_rechargeFragment"
|
||||
app:destination="@id/rechargeFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 金币充值全局跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_goldCoinRechargeFragment"
|
||||
app:destination="@id/goldCoinRechargeFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 个人设置 -->
|
||||
<fragment
|
||||
android:id="@+id/PersonalSettings"
|
||||
android:name="com.example.myapplication.ui.mine.myotherpages.PersonalSettings"
|
||||
android:label="Setting"
|
||||
tools:layout="@layout/personal_settings"/>
|
||||
|
||||
<!-- 我的键盘 -->
|
||||
<fragment
|
||||
android:id="@+id/MyKeyboard"
|
||||
android:name="com.example.myapplication.ui.keyboard.MyKeyboard"
|
||||
android:label="Keyboard"
|
||||
tools:layout="@layout/my_keyboard" />
|
||||
|
||||
<!-- 键盘详情 -->
|
||||
<fragment
|
||||
android:id="@+id/keyboardDetailFragment"
|
||||
android:name="com.example.myapplication.ui.keyboard.KeyboardDetailFragment"
|
||||
android:label="Keyboard Detail"
|
||||
tools:layout="@layout/keyboard_detail">
|
||||
<argument
|
||||
android:name="themeId"
|
||||
android:defaultValue="0"
|
||||
app:argType="integer" />
|
||||
</fragment>
|
||||
|
||||
<!-- 键盘详情全局跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_keyboardDetailFragment"
|
||||
app:destination="@id/keyboardDetailFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 我的皮肤 -->
|
||||
<fragment
|
||||
android:id="@+id/MySkin"
|
||||
android:name="com.example.myapplication.ui.shop.myskin.MySkin"
|
||||
android:label="My Skin"
|
||||
tools:layout="@layout/my_skin" />
|
||||
|
||||
<!-- 搜索 -->
|
||||
<fragment
|
||||
android:id="@+id/searchFragment"
|
||||
android:name="com.example.myapplication.ui.shop.search.SearchFragment"
|
||||
android:label="Search"
|
||||
tools:layout="@layout/fragment_search">
|
||||
<action
|
||||
android:id="@+id/action_searchFragment_to_searchResultFragment"
|
||||
app:destination="@id/searchResultFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
</fragment>
|
||||
|
||||
<!-- 搜索结果 -->
|
||||
<fragment
|
||||
android:id="@+id/searchResultFragment"
|
||||
android:name="com.example.myapplication.ui.shop.search.SearchResultFragment"
|
||||
android:label="Search Result"
|
||||
tools:layout="@layout/fragment_search_result" />
|
||||
|
||||
<!-- 反馈 -->
|
||||
<fragment
|
||||
android:id="@+id/feedbackFragment"
|
||||
android:name="com.example.myapplication.ui.mine.myotherpages.FeedbackFragment"
|
||||
android:label="Feedback"
|
||||
tools:layout="@layout/feedback_fragment" />
|
||||
|
||||
<!-- 登录页面 -->
|
||||
<fragment
|
||||
android:id="@+id/loginFragment"
|
||||
android:name="com.example.myapplication.ui.login.LoginFragment"
|
||||
android:label="Login"
|
||||
tools:layout="@layout/fragment_login" />
|
||||
|
||||
<!-- 全局登录跳转 -->
|
||||
<action
|
||||
android:id="@+id/action_global_loginFragment"
|
||||
app:destination="@id/loginFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_loginFragment"
|
||||
app:destination="@id/loginFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 注册页面 -->
|
||||
<fragment
|
||||
android:id="@+id/registerFragment"
|
||||
android:name="com.example.myapplication.ui.login.RegisterFragment"
|
||||
android:label="Register"
|
||||
tools:layout="@layout/fragment_register" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_mineFragment_to_registerFragment"
|
||||
app:destination="@id/registerFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 忘记密码邮箱输入页面 -->
|
||||
<fragment
|
||||
android:id="@+id/forgetPasswordEmailFragment"
|
||||
android:name="com.example.myapplication.ui.login.ForgetPasswordEmailFragment"
|
||||
android:label="Forget Password Email"
|
||||
tools:layout="@layout/fragment_forget_password_email" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_loginFragment_to_forgetPasswordEmailFragment"
|
||||
app:destination="@id/forgetPasswordEmailFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 忘记密码验证码输入页面 -->
|
||||
<fragment
|
||||
android:id="@+id/forgetPasswordVerifyFragment"
|
||||
android:name="com.example.myapplication.ui.login.ForgetPasswordVerifyFragment"
|
||||
android:label="Forget Password Verify"
|
||||
tools:layout="@layout/fragment_forget_password_verify" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_forgetPasswordEmailFragment_to_forgetPasswordVerifyFragment"
|
||||
app:destination="@id/forgetPasswordVerifyFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 忘记密码重置密码页面 -->
|
||||
<fragment
|
||||
android:id="@+id/forgetPasswordResetFragment"
|
||||
android:name="com.example.myapplication.ui.login.ForgetPasswordResetFragment"
|
||||
android:label="Forget Password Reset"
|
||||
tools:layout="@layout/fragment_forget_password_reset" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_forgetPasswordVerifyFragment_to_forgetPasswordResetFragment"
|
||||
app:destination="@id/forgetPasswordResetFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast"/>
|
||||
|
||||
<!-- 通知 -->
|
||||
<fragment
|
||||
android:id="@+id/notificationFragment"
|
||||
android:name="com.example.myapplication.ui.mine.myotherpages.NotificationFragment"
|
||||
android:label="Notification"
|
||||
tools:layout="@layout/notification_fragment" />
|
||||
|
||||
</navigation>
|
||||
</navigation>
|
||||
58
app/src/main/res/navigation/shop_graph.xml
Normal file
@@ -0,0 +1,58 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<navigation xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/shop_graph"
|
||||
app:startDestination="@id/shopFragment">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/shopFragment"
|
||||
android:name="com.example.myapplication.ui.shop.ShopFragment"
|
||||
android:label="Shop"
|
||||
tools:layout="@layout/fragment_shop">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_shopfragment_to_myskin"
|
||||
app:destination="@id/MySkin"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
|
||||
<action
|
||||
android:id="@+id/action_shopfragment_to_searchfragment"
|
||||
app:destination="@id/searchFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/MySkin"
|
||||
android:name="com.example.myapplication.ui.shop.myskin.MySkin"
|
||||
android:label="My Skin"
|
||||
tools:layout="@layout/my_skin" />
|
||||
|
||||
<fragment
|
||||
android:id="@+id/searchFragment"
|
||||
android:name="com.example.myapplication.ui.shop.search.SearchFragment"
|
||||
android:label="Search"
|
||||
tools:layout="@layout/fragment_search">
|
||||
|
||||
<action
|
||||
android:id="@+id/action_searchFragment_to_searchResultFragment"
|
||||
app:destination="@id/searchResultFragment"
|
||||
app:enterAnim="@anim/fade_in"
|
||||
app:exitAnim="@anim/fade_out"
|
||||
app:popEnterAnim="@anim/fade_in_fast"
|
||||
app:popExitAnim="@anim/fade_out_fast" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/searchResultFragment"
|
||||
android:name="com.example.myapplication.ui.shop.search.SearchResultFragment"
|
||||
android:label="Search Result"
|
||||
tools:layout="@layout/fragment_search_result" />
|
||||
|
||||
</navigation>
|
||||
@@ -19,6 +19,7 @@
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:textSize">20sp</item>
|
||||
<item name="android:maxLength">1</item>
|
||||
<item name="android:inputType">number</item>
|
||||
<item name="android:background">@drawable/code_box_bg</item>
|
||||
<item name="android:textColor">#000000</item>
|
||||
</style>
|
||||
|
||||