From 7475bfeadee82878faf2188665ae5ae83875835c Mon Sep 17 00:00:00 2001 From: Administrator <123> Date: Mon, 25 Oct 2021 09:50:29 +0000 Subject: [PATCH] 大厅UI布局 我的UI布局 --- app/src/main/res/layout/fragment_notifications.xml | 421 ++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 406 insertions(+), 15 deletions(-) diff --git a/app/src/main/res/layout/fragment_notifications.xml b/app/src/main/res/layout/fragment_notifications.xml index 01a3222..47368bf 100644 --- a/app/src/main/res/layout/fragment_notifications.xml +++ b/app/src/main/res/layout/fragment_notifications.xml @@ -1,23 +1,414 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout +<androidx.core.widget.NestedScrollView 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:layout_width="match_parent" android:layout_height="match_parent" - tools:context=".ui.notifications.NotificationsFragment" > + android:background="@color/white_2" + tools:context=".ui.notifications.NotificationsFragment"> - <TextView - android:id="@+id/text_notifications" + <androidx.constraintlayout.widget.ConstraintLayout android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginStart="8dp" - android:layout_marginTop="8dp" - android:layout_marginEnd="8dp" - android:textAlignment="center" - android:textSize="20sp" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" /> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file + android:layout_height="wrap_content"> + <View + android:layout_width="match_parent" + android:layout_height="140dp" + android:background="@color/red" + app:layout_constraintHorizontal_bias="0.0" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + + <ImageView + android:id="@+id/image_head" + android:layout_width="75dp" + android:layout_height="77dp" + android:layout_marginLeft="@dimen/frame_margin_lr" + app:layout_constraintBottom_toTopOf="@id/layout_account_menu" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:src="@tools:sample/avatars" /> + + <TextView + android:id="@+id/txt_nick" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="20dp" + android:layout_marginTop="20dp" + android:text="昵称" + app:layout_constraintLeft_toRightOf="@id/image_head" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/txt_id" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="@dimen/frame_margin_lr" + android:text="ID:0000000" + app:layout_constraintLeft_toLeftOf="@id/txt_nick" + app:layout_constraintTop_toBottomOf="@id/txt_nick" /> + + <TextView + android:id="@+id/txt_register_date" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginLeft="20dp" + android:text="注册日期:2020/02/02" + app:layout_constraintLeft_toRightOf="@id/txt_id" + app:layout_constraintTop_toTopOf="@id/txt_id" /> + + <ImageView + android:id="@+id/img_level" + android:layout_width="24dp" + android:layout_height="17dp" + android:layout_marginTop="@dimen/frame_margin_lr" + android:src="@android:drawable/btn_star_big_on" + app:layout_constraintLeft_toLeftOf="@id/txt_id" + app:layout_constraintTop_toBottomOf="@id/txt_id" /> + + <ProgressBar + android:id="@+id/progress_level" + style="?android:attr/progressBarStyleHorizontal" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:layout_constraintBottom_toBottomOf="@id/img_level" + app:layout_constraintLeft_toRightOf="@id/img_level" + app:layout_constraintTop_toTopOf="@id/img_level" /> + + <TextView + android:id="@+id/txt_score" + android:layout_width="wrap_content" + android:layout_height="19dp" + android:layout_marginStart="41dp" + android:text="等级值" + app:layout_constraintBottom_toBottomOf="@id/progress_level" + app:layout_constraintStart_toEndOf="@+id/progress_level" + tools:layout_constraintTop_toTopOf="@id/progress_level" /> + + <TextView + android:id="@+id/txt_mine" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:background="@color/sky" + android:padding="4dp" + android:text="我的主页" + android:textColor="@color/white_2" + app:layout_constraintBottom_toTopOf="@+id/layout_account_menu" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:ignore="TextContrastCheck" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/layout_account_menu" + android:layout_width="match_parent" + android:layout_height="51dp" + android:layout_margin="@dimen/frame_margin_lr" + android:background="@drawable/bg_white_corner" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@+id/progress_level"> + + <TextView + android:id="@+id/txt_recharge" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="充值" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@id/txt_cash" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/txt_cash" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="提现" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toRightOf="@id/txt_recharge" + app:layout_constraintRight_toLeftOf="@id/txt_deposit" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/txt_deposit" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="保证金" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toRightOf="@id/txt_cash" + app:layout_constraintRight_toLeftOf="@id/txt_balance" + app:layout_constraintTop_toTopOf="parent" /> + + <TextView + android:id="@+id/txt_balance" + android:layout_width="wrap_content" + android:layout_height="19dp" + android:text="金额" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toRightOf="@id/txt_deposit" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/layout_apply_vip" + android:layout_width="0dp" + android:layout_height="53dp" + android:background="#DFA907" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="parent" + android:layout_margin="@dimen/frame_margin_lr" + app:layout_constraintTop_toBottomOf="@+id/layout_account_menu"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="开通尊享会员" + android:textColor="@color/white" + android:layout_margin="@dimen/frame_margin_lr" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent"/> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="专属权益" + android:textColor="@color/white" + android:layout_margin="@dimen/frame_margin_lr" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" /> + </androidx.constraintlayout.widget.ConstraintLayout> + + <androidx.constraintlayout.widget.ConstraintLayout + android:id="@+id/layout_property" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_margin="@dimen/frame_margin_lr" + android:background="@drawable/bg_white_corner" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/layout_apply_vip"> + + <TextView + android:id="@+id/txt_property_title" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="资产情况" + android:textColor="@color/black" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toTopOf="@id/view" + android:layout_marginBottom="20dp" + android:layout_marginLeft="20dp" + android:layout_marginTop="20dp" /> + <View + android:id="@+id/view" + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:layout_marginTop="10dp" + app:layout_constraintTop_toBottomOf="@id/txt_property_title" + app:layout_constraintLeft_toLeftOf="parent" + android:background="@color/gray" /> + <LinearLayout + android:id="@+id/lin_bounty" + style="@style/mine_property_lin" + app:layout_constraintTop_toBottomOf="@id/view" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@id/lin_reward"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="赏金" + android:textColor="@color/black"/> + <TextView + android:id="@+id/txt_bounty" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/red" + android:text="0" /> + + </LinearLayout> + + <LinearLayout + android:id="@+id/lin_reward" + style="@style/mine_property_lin" + app:layout_constraintTop_toBottomOf="@id/view" + app:layout_constraintLeft_toRightOf="@id/lin_bounty" + app:layout_constraintRight_toLeftOf="@id/lin_amount"> + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/black" + android:text="奖励" /> + + <TextView + android:id="@+id/txt_reward" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="0" + android:textColor="@color/red" /> + + + + </LinearLayout> + + <LinearLayout + android:id="@+id/lin_amount" + style="@style/mine_property_lin" + app:layout_constraintTop_toBottomOf="@id/view" + app:layout_constraintLeft_toRightOf="@id/lin_reward" + app:layout_constraintRight_toLeftOf="@id/lin_deposit"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="金额" + android:textColor="@color/black" /> + + <TextView + android:id="@+id/txt_amount_count" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="0" + android:textColor="@color/red" /> + </LinearLayout> + + <LinearLayout + android:id="@+id/lin_deposit" + style="@style/mine_property_lin" + app:layout_constraintTop_toBottomOf="@id/view" + app:layout_constraintLeft_toRightOf="@id/lin_amount" + app:layout_constraintRight_toRightOf="parent"> + + <TextView + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="保证金" + android:textColor="@color/black"/> + + <TextView + android:id="@+id/txt_deposit_count" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:textColor="@color/red" + android:text="0" /> + </LinearLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> + + <LinearLayout + android:id="@+id/layout_missions" + android:layout_width="match_parent" + android:layout_height="60dp" + android:layout_margin="@dimen/frame_margin_lr" + android:background="@drawable/bg_white_corner" + android:orientation="horizontal" + android:gravity="center" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/layout_property"> + + <TextView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:text="发布任务" + android:gravity="center" + android:layout_weight="1" + android:layout_gravity="center" /> + <View + android:layout_width="0.5dp" + android:layout_height="match_parent" + android:background="@color/gray" /> + <TextView + android:layout_width="match_parent" + android:layout_height="match_parent" + android:text="我的接单" + android:gravity="center" + android:layout_weight="1" /> + </LinearLayout> + + <ImageView + android:id="@+id/img_add" + android:layout_width="match_parent" + android:layout_height="80dp" + android:adjustViewBounds="true" + android:scaleType="centerCrop" + android:layout_margin="@dimen/frame_margin_lr" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/layout_missions" + tools:src="@tools:sample/backgrounds/scenic" /> + + <androidx.constraintlayout.widget.ConstraintLayout + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/bg_white_corner" + app:layout_constraintTop_toBottomOf="@id/img_add" + android:layout_margin="@dimen/frame_margin_lr" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent"> + + <TextView + android:id="@+id/txt_missions_manager" + style="@style/mine_system" + app:layout_constraintTop_toTopOf="parent" + android:text="发布管理" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@id/txt_missions_expand"/> + <TextView + android:id="@+id/txt_missions_expand" + style="@style/mine_system" + app:layout_constraintTop_toTopOf="parent" + android:text="竞价推广" + app:layout_constraintLeft_toRightOf="@id/txt_missions_manager" + app:layout_constraintRight_toLeftOf="@+id/txt_my_message"/> + <TextView + android:id="@+id/txt_my_message" + style="@style/mine_system" + app:layout_constraintTop_toTopOf="parent" + android:text="我的消息" + app:layout_constraintLeft_toRightOf="@id/txt_missions_expand" + app:layout_constraintRight_toLeftOf="@+id/txt_attestation"/> + <TextView + android:id="@+id/txt_attestation" + style="@style/mine_system" + app:layout_constraintTop_toTopOf="parent" + android:text="实名认证" + app:layout_constraintLeft_toRightOf="@id/txt_my_message" + app:layout_constraintRight_toRightOf="parent"/> + + <TextView + android:id="@+id/txt_credit" + style="@style/mine_system" + app:layout_constraintTop_toBottomOf="@+id/txt_missions_manager" + android:text="信用等级" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@id/txt_service"/> + <TextView + android:id="@+id/txt_service" + style="@style/mine_system" + app:layout_constraintTop_toBottomOf="@+id/txt_missions_manager" + android:text="联系客服" + app:layout_constraintLeft_toRightOf="@id/txt_credit" + app:layout_constraintRight_toLeftOf="@+id/txt_black"/> + <TextView + android:id="@+id/txt_black" + style="@style/mine_system" + app:layout_constraintTop_toBottomOf="@+id/txt_missions_manager" + android:text="黑名单" + app:layout_constraintLeft_toRightOf="@id/txt_service" + app:layout_constraintRight_toLeftOf="@+id/txt_setting"/> + <TextView + android:id="@+id/txt_setting" + style="@style/mine_system" + app:layout_constraintTop_toBottomOf="@+id/txt_missions_manager" + android:text="设置" + app:layout_constraintLeft_toRightOf="@id/txt_black" + app:layout_constraintRight_toRightOf="parent"/> + </androidx.constraintlayout.widget.ConstraintLayout> + + </androidx.constraintlayout.widget.ConstraintLayout> +</androidx.core.widget.NestedScrollView> \ No newline at end of file -- Gitblit v1.9.1