Administrator
2021-11-03 2d2f1ee2dd3cc4dc00735fc25d87064adbd10231
app/src/main/res/layout/fragment_home.xml
@@ -1,72 +1,169 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
<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"
    tools:ignore="MissingConstraints"
    tools:context=".ui.home.HomeFragment"
    tools:context=".ui.main.home.HomeFragment"
    android:layout_width="match_parent"
    android:orientation="vertical"
    android:layout_height="match_parent">
    <ImageView
        android:id="@+id/img_search"
        android:layout_width="39dp"
    <View
        android:id="@+id/top_view"
        android:layout_width="match_parent"
        android:layout_height="50dp"
        android:background="@color/red"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>
    <TextView
        android:id="@+id/text_bidding"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:paddingRight="@dimen/frame_margin_lr"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintTop_toTopOf="@id/top_view"
        app:layout_constraintBottom_toBottomOf="@id/top_view"
        app:layout_constraintRight_toLeftOf="@id/text_search"
        android:text="竞价"
        android:textColor="@color/white" />
    <TextView
        android:id="@+id/text_search"
        android:layout_width="0dp"
        android:layout_height="35dp"
        android:src="@android:drawable/ic_search_category_default"/>
        android:drawableLeft="@mipmap/icon_search"
        android:text="任务标题、编号"
        android:textColor="@color/gray"
        android:drawablePadding="10dp"
        android:background="@drawable/trans_gray_circle"
        android:gravity="center"
        android:paddingLeft="20dp"
        android:paddingRight="20dp"
        android:layout_marginLeft="@dimen/activity_horizontal_margin"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        app:layout_constraintLeft_toRightOf="@id/text_bidding"
        app:layout_constraintRight_toLeftOf="@id/image_service"
        app:layout_constraintTop_toTopOf="@id/top_view"
        app:layout_constraintBottom_toBottomOf="@id/top_view" />
    <ImageView
        android:id="@+id/image_service"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/abc_vector_test"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        app:layout_constraintTop_toTopOf="@id/top_view"
        app:layout_constraintBottom_toBottomOf="@id/top_view"
        app:layout_constraintRight_toLeftOf="@id/image_invite"/>
    <ImageView
        android:id="@+id/image_invite"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:src="@drawable/abc_vector_test"
        android:layout_marginRight="@dimen/activity_horizontal_margin"
        app:layout_constraintTop_toTopOf="@id/top_view"
        app:layout_constraintBottom_toBottomOf="@id/top_view"
        app:layout_constraintRight_toRightOf="parent"  />
    <com.scwang.smart.refresh.layout.SmartRefreshLayout
        android:id="@+id/smart_refresh"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_height="0dp"
        app:layout_constraintTop_toBottomOf="@id/top_view"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintBottom_toBottomOf="parent"
        >
        <androidx.constraintlayout.widget.ConstraintLayout
        <androidx.core.widget.NestedScrollView
            android:layout_width="match_parent"
            android:layout_height="match_parent" >
            android:layout_height="match_parent">
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_top"
            <androidx.constraintlayout.widget.ConstraintLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
                app:spanCount="3"
                tools:itemCount="3"
                tools:listitem="@layout/home_item_top" />
                android:layout_height="wrap_content" >
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_classify"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_marginTop="10dp"
                tools:listitem="@layout/home_item_classify"
                app:layout_constraintTop_toBottomOf="@id/recycler_top"
                app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
                app:spanCount="5"
                tools:itemCount="3"
                tools:layout_editor_absoluteX="1dp"
                tools:layout_editor_absoluteY="247dp"/>
            <TextView
                android:id="@+id/text_recommend"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                app:layout_constraintTop_toBottomOf="@id/recycler_classify"
                app:layout_constraintLeft_toLeftOf="parent"
                android:textSize="14dp"
                android:text="任务推荐"
                android:textColor="@color/black"
                android:layout_margin="@dimen/frame_margin_lr" />
                <View
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:background="@drawable/bg_red_bottom_corner"
                    app:layout_constraintTop_toTopOf="parent"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintRight_toRightOf="parent"
                    app:layout_constraintBottom_toBottomOf="@id/recycler_classify"
                    android:layout_marginBottom="50dp"/>
            <androidx.recyclerview.widget.RecyclerView
                android:id="@+id/recycler_recommend"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                tools:listitem="@layout/homt_item_recommend"
                app:layout_constraintLeft_toLeftOf="parent"
                app:layout_constraintTop_toBottomOf="@id/text_recommend"
                />
                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_top"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:overScrollMode="never"
                    android:layout_margin="@dimen/activity_horizontal_margin"
                    app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
                    app:spanCount="3"
                    tools:itemCount="3"
                    tools:listitem="@layout/home_item_top" />
        </androidx.constraintlayout.widget.ConstraintLayout>
                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_classify"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:layout_marginTop="10dp"
                    android:overScrollMode="never"
                    android:background="@drawable/bg_white_corner"
                    android:layout_margin="@dimen/activity_horizontal_margin"
                    android:elevation="@dimen/small_radios"
                    tools:listitem="@layout/home_item_classify"
                    app:layout_constraintTop_toBottomOf="@id/recycler_top"
                    app:layoutManager="androidx.recyclerview.widget.GridLayoutManager"
                    app:spanCount="3"
                    tools:itemCount="3"
                    tools:layout_editor_absoluteX="1dp"
                    tools:layout_editor_absoluteY="247dp"/>
                <TextView
                    android:id="@+id/text_recommend"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/recycler_classify"
                    app:layout_constraintLeft_toLeftOf="parent"
                    android:textSize="14dp"
                    android:text="任务推荐"
                    android:textColor="@color/black"
                    android:layout_margin="@dimen/activity_horizontal_margin" />
                <TextView
                    android:id="@+id/text_newcomer"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    app:layout_constraintTop_toBottomOf="@id/recycler_classify"
                    app:layout_constraintRight_toRightOf="parent"
                    android:textSize="14dp"
                    android:text="新人易做 >"
                    android:textColor="@color/black"
                    android:layout_margin="@dimen/activity_horizontal_margin" />
                <androidx.recyclerview.widget.RecyclerView
                    android:id="@+id/recycler_recommend"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:overScrollMode="never"
                    tools:listitem="@layout/homt_item_recommend"
                    android:padding="@dimen/activity_horizontal_margin"
                    app:layout_constraintLeft_toLeftOf="parent"
                    app:layout_constraintTop_toBottomOf="@id/text_recommend"
                    />
            </androidx.constraintlayout.widget.ConstraintLayout>
        </androidx.core.widget.NestedScrollView>
    </com.scwang.smart.refresh.layout.SmartRefreshLayout>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>