update 排行榜 筛选 搜索

This commit is contained in:
2023-10-14 18:23:08 +08:00
parent 0c5533ffb3
commit 6211756744
23 changed files with 848 additions and 260 deletions

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/bg_search_select" android:state_checked="true"/>
<item android:drawable="@drawable/bg_search_unselect" android:state_checked="false"/>
<item android:drawable="@drawable/bg_search_select" android:state_enabled="true"/>
<item android:drawable="@drawable/bg_search_unselect" android:state_enabled="false"/>
</selector>

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="@drawable/bg_search_select" android:state_checked="true"/>
<item android:drawable="@drawable/bg_search_unselect" android:state_checked="false"/>
</selector>

View File

@@ -0,0 +1,307 @@
<?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:layout_height="match_parent"
android:background="@color/white">
<include
android:id="@+id/include3"
layout="@layout/view_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/activity_top"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/age_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include3">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="年龄"
android:textColor="#333333"
android:textSize="16sp" />
<com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup
android:id="@+id/age_radio_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="5dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexWrap="wrap"
app:justifyContent="flex_start"
app:layout_wrapBefore="true"
app:maxLine="3">
<RadioButton
android:id="@+id/age_all"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:checked="true"
android:gravity="center"
android:tag="all"
android:text="全部"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/age_type1"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="18-25"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/age_type2"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="26-30"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/age_type3"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="31-35"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/age_type4"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="36-40"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/age_type5"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="40以上"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
</com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/sex_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/age_layout">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="性别"
android:textColor="#333333"
android:textSize="16sp" />
<com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup
android:id="@+id/sex_radio_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexWrap="wrap"
app:justifyContent="flex_start"
app:layout_wrapBefore="true"
app:maxLine="3">
<RadioButton
android:id="@+id/sex_all"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:checked="true"
android:gravity="center"
android:tag="all"
android:text="全部"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/sex_man"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:tag="1"
android:text="男"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/sex_woman"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:tag="2"
android:text="女"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
</com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/auth_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sex_layout">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="是否完成真人认证"
android:textColor="#333333"
android:textSize="16sp" />
<com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup
android:id="@+id/auth_radio_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexWrap="wrap"
app:justifyContent="flex_start"
app:layout_wrapBefore="true"
app:maxLine="3">
<RadioButton
android:id="@+id/auth_all"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:checked="true"
android:gravity="center"
android:tag="all"
android:text="全部"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/auth_true"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="已完成"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:id="@+id/auth_false"
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_checked"
android:button="@null"
android:gravity="center"
android:text="未完成"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
</com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup>
</LinearLayout>
<Button
android:id="@+id/apply"
android:layout_width="151dp"
android:layout_height="45dp"
android:background="@drawable/bg_home_search_btn"
android:text="确定"
android:textColor="#FFFFFF"
android:textSize="14sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/auth_layout" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -1,9 +1,9 @@
<?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:layout_height="match_parent"
android:background="@color/white">
android:layout_height="match_parent">
<include
android:id="@+id/include3"
@@ -15,247 +15,97 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<LinearLayout
android:id="@+id/age_layout"
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="18dp"
android:orientation="vertical"
android:layout_height="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include3">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="年龄"
android:textColor="#333333"
android:textSize="16sp" />
<com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup
android:id="@+id/age_radio_group"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexWrap="wrap"
app:justifyContent="flex_start"
app:layout_wrapBefore="true"
app:maxLine="3">
android:gravity="center"
android:orientation="vertical">
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:checked="true"
android:gravity="center"
android:text="全部"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<include
android:id="@+id/view_empty"
layout="@layout/view_empty_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include3"
tools:visibility="visible" />
<io.rong.imkit.widget.refresh.SmartRefreshLayout
android:id="@+id/swipeRefreshLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/searchList"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/include3"
tools:itemCount="3"
tools:listitem="@layout/item_home_recommend"/>
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="18-25"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
</io.rong.imkit.widget.refresh.SmartRefreshLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginTop="36dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal">
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="26-30"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1.9"
android:text="猜你喜欢"
android:textColor="#333333"
android:textSize="18sp" />
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="31-35"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<ImageView
android:id="@+id/refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="end|center"
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="36-40"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="40以上"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
android:layout_weight="0.1"
app:srcCompat="@mipmap/ic_refresh" />
</LinearLayout>
</com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recommendList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view_empty"
app:spanCount="2"
tools:itemCount="3"
tools:listitem="@layout/item_home_hot">
</LinearLayout>
</androidx.recyclerview.widget.RecyclerView>
</LinearLayout>
</androidx.core.widget.NestedScrollView>
<LinearLayout
android:id="@+id/sex_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/age_layout">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="性别"
android:textColor="#333333"
android:textSize="16sp" />
<com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup
android:id="@+id/sex_radio_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexWrap="wrap"
app:justifyContent="flex_start"
app:layout_wrapBefore="true"
app:maxLine="3">
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:checked="true"
android:gravity="center"
android:text="全部"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="男"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="女"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
</com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup>
</LinearLayout>
<LinearLayout
android:id="@+id/auth_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:orientation="vertical"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/sex_layout">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="是否完成真人认证"
android:textColor="#333333"
android:textSize="16sp" />
<com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup
android:id="@+id/auth_radio_group"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="16dp"
android:layout_marginTop="15dp"
android:layout_marginEnd="16dp"
android:orientation="horizontal"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexWrap="wrap"
app:justifyContent="flex_start"
app:layout_wrapBefore="true"
app:maxLine="3">
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:checked="true"
android:gravity="center"
android:text="已完成"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
<RadioButton
android:layout_width="62dp"
android:layout_height="27dp"
android:layout_marginStart="10dp"
android:background="@drawable/bg_home_search_btn"
android:button="@null"
android:gravity="center"
android:text="未完成"
android:textColor="@drawable/bg_home_search_text"
android:textSize="14sp" />
</com.shayu.onetoone.widget.flexboxradiogroup.FlexBoxRadioGroup>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -32,4 +32,15 @@
android:src="@mipmap/ic_recommend_top"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<include
android:id="@+id/view_empty"
layout="@layout/view_empty_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,26 @@
<?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:layout_height="match_parent">
<ImageView
android:id="@+id/imageView3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@mipmap/ic_empty_list" />
<TextView
android:id="@+id/textView5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="没有找到匹配结果~"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/imageView3" />
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="activity_top">22dp</dimen>
<dimen name="activity_top">42dp</dimen>
</resources>