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/drawable/bg_white_corner.xml | 9 app/src/main/res/layout/home_item_classify.xml | 22 - app/src/main/res/values/styles.xml | 21 + app/src/main/res/layout/refresh_recycler.xml | 14 + app/src/main/java/com/duqing/missions/ui/dashboard/DashboardFragment.java | 18 app/src/main/res/drawable/bg_gray_corner.xml | 9 app/src/main/res/color/radio.xml | 7 app/src/main/res/layout/fragment_home.xml | 4 app/src/main/res/color/check.xml | 7 app/src/main/res/color/check_text.xml | 7 app/src/main/res/layout/fragment_notifications.xml | 421 +++++++++++++++++++++++++++++++- app/src/main/res/values/colors.xml | 5 app/src/main/res/layout/fragment_refresh_recycler.xml | 8 app/src/main/java/com/duqing/missions/ui/home/HomeFragment.java | 4 app/src/main/res/drawable/bg_sky_corner.xml | 9 app/src/main/res/drawable-v21/dra_border_gray.xml | 12 app/src/main/res/drawable/dra_border_gray.xml | 6 app/src/main/res/layout/item_classify.xml | 21 + app/src/main/res/drawable/bg_enable_corner.xml | 9 app/src/main/res/color/radio_text.xml | 7 app/src/main/res/layout/fragment_dashboard.xml | 111 +++++++ app/src/main/res/layout/hall_popu_classify.xml | 14 + app/src/main/res/layout/layout_null.xml | 19 + 23 files changed, 713 insertions(+), 51 deletions(-) diff --git a/app/src/main/java/com/duqing/missions/ui/dashboard/DashboardFragment.java b/app/src/main/java/com/duqing/missions/ui/dashboard/DashboardFragment.java index 34ea6f5..a63d963 100644 --- a/app/src/main/java/com/duqing/missions/ui/dashboard/DashboardFragment.java +++ b/app/src/main/java/com/duqing/missions/ui/dashboard/DashboardFragment.java @@ -5,38 +5,36 @@ import android.view.View; import android.view.ViewGroup; import android.widget.TextView; + import androidx.annotation.NonNull; import androidx.annotation.Nullable; import androidx.fragment.app.Fragment; import androidx.lifecycle.Observer; import androidx.lifecycle.ViewModelProvider; + import com.duqing.missions.R; import com.duqing.missions.databinding.FragmentDashboardBinding; public class DashboardFragment extends Fragment { private DashboardViewModel dashboardViewModel; -private FragmentDashboardBinding binding; + private FragmentDashboardBinding binding; - public View onCreateView(@NonNull LayoutInflater inflater, - ViewGroup container, Bundle savedInstanceState) { - dashboardViewModel = - new ViewModelProvider(this).get(DashboardViewModel.class); + public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { + dashboardViewModel = new ViewModelProvider(this).get(DashboardViewModel.class); - binding = FragmentDashboardBinding.inflate(inflater, container, false); - View root = binding.getRoot(); + binding = FragmentDashboardBinding.inflate(inflater, container, false); + View root = binding.getRoot(); - final TextView textView = binding.textDashboard; dashboardViewModel.getText().observe(getViewLifecycleOwner(), new Observer<String>() { @Override public void onChanged(@Nullable String s) { - textView.setText(s); } }); return root; } -@Override + @Override public void onDestroyView() { super.onDestroyView(); binding = null; diff --git a/app/src/main/java/com/duqing/missions/ui/home/HomeFragment.java b/app/src/main/java/com/duqing/missions/ui/home/HomeFragment.java index b93cb75..02ad0bd 100644 --- a/app/src/main/java/com/duqing/missions/ui/home/HomeFragment.java +++ b/app/src/main/java/com/duqing/missions/ui/home/HomeFragment.java @@ -18,6 +18,8 @@ import com.duqing.missions.R; import com.duqing.missions.databinding.FragmentHomeBinding; +import com.scwang.smart.refresh.header.ClassicsHeader; +import com.scwang.smart.refresh.layout.SmartRefreshLayout; public class HomeFragment extends Fragment { @@ -29,6 +31,8 @@ binding = FragmentHomeBinding.inflate(inflater, container, false); View root = binding.getRoot(); + final SmartRefreshLayout smartRefresh = binding.smartRefresh; + smartRefresh.setRefreshHeader(new ClassicsHeader(getContext())); final TextView textView = binding.textRecommend; final ImageView imgSearch = binding.imgSearch; RecyclerView recyclerClassify = binding.recyclerClassify; diff --git a/app/src/main/res/color/check.xml b/app/src/main/res/color/check.xml new file mode 100644 index 0000000..b3b04d9 --- /dev/null +++ b/app/src/main/res/color/check.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource"> + <item android:state_enabled="true" android:color="@color/black_4" /> + <item android:state_checked="true" android:color="@color/white" /> + <item android:state_pressed="true" android:color="@color/white" /> + <item android:color="@color/black" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/color/check_text.xml b/app/src/main/res/color/check_text.xml new file mode 100644 index 0000000..dabde60 --- /dev/null +++ b/app/src/main/res/color/check_text.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource"> + <item android:state_enabled="true" android:color="@color/black_4" /> + <item android:state_checked="true" android:color="@color/sky" /> + <item android:state_pressed="true" android:color="@color/white" /> + <item android:color="@color/black" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/color/radio.xml b/app/src/main/res/color/radio.xml new file mode 100644 index 0000000..b3b04d9 --- /dev/null +++ b/app/src/main/res/color/radio.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource"> + <item android:state_enabled="true" android:color="@color/black_4" /> + <item android:state_checked="true" android:color="@color/white" /> + <item android:state_pressed="true" android:color="@color/white" /> + <item android:color="@color/black" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/color/radio_text.xml b/app/src/main/res/color/radio_text.xml new file mode 100644 index 0000000..dabde60 --- /dev/null +++ b/app/src/main/res/color/radio_text.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource"> + <item android:state_enabled="true" android:color="@color/black_4" /> + <item android:state_checked="true" android:color="@color/sky" /> + <item android:state_pressed="true" android:color="@color/white" /> + <item android:color="@color/black" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable-v21/dra_border_gray.xml b/app/src/main/res/drawable-v21/dra_border_gray.xml new file mode 100644 index 0000000..f4572a5 --- /dev/null +++ b/app/src/main/res/drawable-v21/dra_border_gray.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="utf-8"?> +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="@color/gray"> + <item> + <selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:state_checked="true" android:drawable="@drawable/bg_sky_corner" /> + <item android:state_pressed="true" android:drawable="@drawable/bg_gray_corner" /> + <item android:drawable="@drawable/bg_border_gray_corner" /> + </selector> + </item> + +</ripple> diff --git a/app/src/main/res/drawable/bg_enable_corner.xml b/app/src/main/res/drawable/bg_enable_corner.xml new file mode 100644 index 0000000..5f97144 --- /dev/null +++ b/app/src/main/res/drawable/bg_enable_corner.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/enable" /> + <corners android:radius="@dimen/small_radios"/> + </shape> + </item> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_gray_corner.xml b/app/src/main/res/drawable/bg_gray_corner.xml new file mode 100644 index 0000000..6bdd72d --- /dev/null +++ b/app/src/main/res/drawable/bg_gray_corner.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/gray" /> + <corners android:radius="@dimen/small_radios"/> + </shape> + </item> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_sky_corner.xml b/app/src/main/res/drawable/bg_sky_corner.xml new file mode 100644 index 0000000..ae4c2ce --- /dev/null +++ b/app/src/main/res/drawable/bg_sky_corner.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/sky" /> + <corners android:radius="@dimen/small_radios"/> + </shape> + </item> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_white_corner.xml b/app/src/main/res/drawable/bg_white_corner.xml new file mode 100644 index 0000000..5eb2342 --- /dev/null +++ b/app/src/main/res/drawable/bg_white_corner.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item> + <shape android:shape="rectangle"> + <solid android:color="@color/white" /> + <corners android:radius="@dimen/small_radios"/> + </shape> + </item> +</selector> \ No newline at end of file diff --git a/app/src/main/res/drawable/dra_border_gray.xml b/app/src/main/res/drawable/dra_border_gray.xml new file mode 100644 index 0000000..9917117 --- /dev/null +++ b/app/src/main/res/drawable/dra_border_gray.xml @@ -0,0 +1,6 @@ +<?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/bg_sky_corner" /> + <item android:state_pressed="true" android:drawable="@drawable/bg_gray_corner" /> + <item android:drawable="@drawable/bg_border_gray_corner" /> +</selector> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_dashboard.xml b/app/src/main/res/layout/fragment_dashboard.xml index 0ef53b9..377b41f 100644 --- a/app/src/main/res/layout/fragment_dashboard.xml +++ b/app/src/main/res/layout/fragment_dashboard.xml @@ -7,17 +7,106 @@ android:layout_height="match_parent" tools:context=".ui.dashboard.DashboardFragment" > - <TextView - android:id="@+id/text_dashboard" + <com.google.android.material.tabs.TabLayout + android:id="@+id/tablayout" 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" /> + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toTopOf="parent"> + + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="全部" /> + + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="人气" /> + + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="简单" /> + <com.google.android.material.tabs.TabItem + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="高价" /> + </com.google.android.material.tabs.TabLayout> + + <RadioGroup + android:id="@+id/radio_group" + android:layout_width="0dp" + android:layout_height="40dp" + app:layout_constraintHorizontal_chainStyle="spread" + app:layout_constraintHorizontal_weight="4" + app:layout_constraintTop_toBottomOf="@id/tablayout" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toLeftOf="@id/check_classify" + android:orientation="horizontal"> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="综合" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="最新" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="价格" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + <com.google.android.material.radiobutton.MaterialRadioButton + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:button="@null" + android:text="人气" + android:textColor="@color/radio_text" + android:gravity="center" + android:layout_weight="1" /> + + </RadioGroup> + + <com.google.android.material.checkbox.MaterialCheckBox + android:id="@+id/check_classify" + android:layout_width="0dp" + android:layout_height="40dp" + android:button="@null" + android:text="分类▼" + android:gravity="center" + android:textColor="@color/radio_text" + app:layout_constraintRight_toRightOf="parent" + app:layout_constraintTop_toBottomOf="@id/tablayout" + app:layout_constraintLeft_toRightOf="@id/radio_group" + app:layout_constraintHorizontal_weight="1" + app:layout_constraintHorizontal_chainStyle="spread" /> + + <View + android:id="@+id/view" + android:layout_width="match_parent" + android:layout_height="0.5dp" + android:background="@color/gray" + app:layout_constraintTop_toBottomOf="@id/radio_group" + app:layout_constraintLeft_toLeftOf="parent"/> + + <FrameLayout + android:id="@+id/framelayout" + android:layout_width="match_parent" + android:layout_height="0dp" + app:layout_constraintTop_toBottomOf="@id/view" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" /> </androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index e61f67d..47973db 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -13,7 +13,7 @@ android:layout_width="39dp" android:layout_height="35dp" android:src="@android:drawable/ic_search_category_default"/> - <androidx.core.widget.NestedScrollView + <com.scwang.smart.refresh.layout.SmartRefreshLayout android:id="@+id/smart_refresh" android:layout_width="match_parent" android:layout_height="match_parent" @@ -67,6 +67,6 @@ /> </androidx.constraintlayout.widget.ConstraintLayout> - </androidx.core.widget.NestedScrollView> + </com.scwang.smart.refresh.layout.SmartRefreshLayout> </LinearLayout> \ No newline at end of file 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 diff --git a/app/src/main/res/layout/fragment_refresh_recycler.xml b/app/src/main/res/layout/fragment_refresh_recycler.xml new file mode 100644 index 0000000..b99cd75 --- /dev/null +++ b/app/src/main/res/layout/fragment_refresh_recycler.xml @@ -0,0 +1,8 @@ +<?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" + android:layout_height="match_parent"> + + <include layout="@layout/refresh_recycler" /> + +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/hall_popu_classify.xml b/app/src/main/res/layout/hall_popu_classify.xml new file mode 100644 index 0000000..0722bf5 --- /dev/null +++ b/app/src/main/res/layout/hall_popu_classify.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.recyclerview.widget.RecyclerView xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + xmlns:app="http://schemas.android.com/apk/res-auto" + android:id="@+id/recycler" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:background="@drawable/bg_border_gray_corner" + android:paddingBottom="@dimen/frame_margin_lr" + app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" + app:spanCount="4" + tools:listitem="@layout/item_classify" + tools:itemCount="8"> +</androidx.recyclerview.widget.RecyclerView> \ No newline at end of file diff --git a/app/src/main/res/layout/home_item_classify.xml b/app/src/main/res/layout/home_item_classify.xml index 493a4b8..de20ca3 100644 --- a/app/src/main/res/layout/home_item_classify.xml +++ b/app/src/main/res/layout/home_item_classify.xml @@ -1,9 +1,12 @@ <?xml version="1.0" encoding="utf-8"?> -<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" +<LinearLayout 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_marginRight="10dp" - android:layout_marginLeft="10dp" + android:layout_marginRight="@dimen/frame_margin_lr" + android:layout_marginLeft="@dimen/frame_margin_lr" + android:layout_marginTop="@dimen/frame_margin_lr" + android:orientation="vertical" + android:gravity="center" android:layout_width="match_parent" android:layout_height="wrap_content"> @@ -12,19 +15,12 @@ android:layout_width="80dp" android:layout_height="wrap_content" android:adjustViewBounds="true" - tools:srcCompat="@tools:sample/avatars" - app:layout_constraintTop_toTopOf="parent" - app:layout_constraintBottom_toBottomOf="parent" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent"/> + tools:srcCompat="@tools:sample/avatars"/> <TextView android:id="@+id/textView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="TextView" - android:layout_marginTop="8dp" - app:layout_constraintTop_toBottomOf="@id/img_icon" - app:layout_constraintLeft_toLeftOf="parent" - app:layout_constraintRight_toRightOf="parent" /> -</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file + android:layout_marginTop="8dp" /> +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/item_classify.xml b/app/src/main/res/layout/item_classify.xml new file mode 100644 index 0000000..57e9f27 --- /dev/null +++ b/app/src/main/res/layout/item_classify.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + 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_marginTop="@dimen/frame_margin_lr" + android:layout_width="match_parent" + android:gravity="center" + android:layout_height="wrap_content"> + <CheckBox + android:id="@+id/check" + android:background="@drawable/dra_border_gray" + android:text="分类" + android:button="@null" + android:layout_gravity="center" + android:gravity="center" + android:padding="0dp" + android:textColor="@color/check_text" + android:layout_width="70dp" + android:layout_height="35dp" /> +</LinearLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/layout_null.xml b/app/src/main/res/layout/layout_null.xml new file mode 100644 index 0000000..beac830 --- /dev/null +++ b/app/src/main/res/layout/layout_null.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<androidx.constraintlayout.widget.ConstraintLayout + 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:minHeight="400dp" + android:layout_height="match_parent"> + + <TextView + android:id="@+id/textView" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:text="暂无数据" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintRight_toRightOf="parent"/> +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file diff --git a/app/src/main/res/layout/refresh_recycler.xml b/app/src/main/res/layout/refresh_recycler.xml new file mode 100644 index 0000000..fceabe9 --- /dev/null +++ b/app/src/main/res/layout/refresh_recycler.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<com.scwang.smart.refresh.layout.SmartRefreshLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:id="@+id/smart_refresh" + android:layout_width="match_parent" + android:layout_height="match_parent"> + + <androidx.recyclerview.widget.RecyclerView + android:id="@+id/recycler" + android:layout_width="match_parent" + android:layout_height="wrap_content" + tools:itemCount="1" + tools:listitem="@layout/layout_null"/> +</com.scwang.smart.refresh.layout.SmartRefreshLayout> \ No newline at end of file diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 9b5825e..557116e 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -6,7 +6,12 @@ <color name="teal_200">#FF03DAC5</color> <color name="teal_700">#FF018786</color> <color name="black">#FF000000</color> + <color name="black_4">#4E4E4E</color> <color name="white">#FFFFFFFF</color> + <color name="white_2">#F3F3F3</color> <color name="red">#FF1414</color> <color name="gray">#CDCDCD</color> + <color name="enable">#ECECEC</color> + <color name="sky">#509CFA</color> + <color name="gold">#FAD550</color> </resources> \ No newline at end of file diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..418f8ee --- /dev/null +++ b/app/src/main/res/values/styles.xml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="mine_property_lin"> + <item name="android:layout_width">0dp</item> + <item name="android:layout_height">70dp</item> + <item name="android:gravity">center</item> + <item name="android:orientation">vertical</item> + <item name="layout_constraintHorizontal_chainStyle">spread</item> + <item name="layout_constraintHorizontal_weight">1</item> + </style> + + <style name="mine_system"> + <item name="android:layout_width">0dp</item> + <item name="android:layout_height">70dp</item> + <item name="android:gravity">center</item> + <item name="android:orientation">vertical</item> + <item name="layout_constraintHorizontal_chainStyle">spread</item> + <item name="layout_constraintHorizontal_weight">1</item> + </style> +</resources> \ No newline at end of file -- Gitblit v1.9.1