From 9fbcdc146440b49ef80714c1336c226e00727da8 Mon Sep 17 00:00:00 2001 From: Administrator <123> Date: Thu, 28 Oct 2021 10:16:30 +0000 Subject: [PATCH] 其他部分框架方法及文件新增 --- app/src/main/res/layout/fragment_home.xml | 17 +++++++++++++---- 1 files changed, 13 insertions(+), 4 deletions(-) diff --git a/app/src/main/res/layout/fragment_home.xml b/app/src/main/res/layout/fragment_home.xml index 47973db..6ed5bfb 100644 --- a/app/src/main/res/layout/fragment_home.xml +++ b/app/src/main/res/layout/fragment_home.xml @@ -1,10 +1,10 @@ <?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"> @@ -12,11 +12,17 @@ android:id="@+id/img_search" android:layout_width="39dp" android:layout_height="35dp" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintTop_toTopOf="parent" + app:layout_constraintBottom_toTopOf="@id/smart_refresh" android:src="@android:drawable/ic_search_category_default"/> <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/img_search" + app:layout_constraintLeft_toLeftOf="parent" + app:layout_constraintBottom_toBottomOf="parent" > <androidx.constraintlayout.widget.ConstraintLayout @@ -28,6 +34,7 @@ android:id="@+id/recycler_top" android:layout_width="match_parent" android:layout_height="wrap_content" + android:overScrollMode="never" app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" app:spanCount="3" tools:itemCount="3" @@ -38,6 +45,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginTop="10dp" + android:overScrollMode="never" tools:listitem="@layout/home_item_classify" app:layout_constraintTop_toBottomOf="@id/recycler_top" app:layoutManager="androidx.recyclerview.widget.GridLayoutManager" @@ -61,6 +69,7 @@ android:id="@+id/recycler_recommend" android:layout_width="match_parent" android:layout_height="wrap_content" + android:overScrollMode="never" tools:listitem="@layout/homt_item_recommend" app:layout_constraintLeft_toLeftOf="parent" app:layout_constraintTop_toBottomOf="@id/text_recommend" @@ -69,4 +78,4 @@ </androidx.constraintlayout.widget.ConstraintLayout> </com.scwang.smart.refresh.layout.SmartRefreshLayout> -</LinearLayout> \ No newline at end of file +</androidx.constraintlayout.widget.ConstraintLayout> \ No newline at end of file -- Gitblit v1.9.1