From d3ebd763a294436f50cd33b8759680e94653302c Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 24 Jan 2019 14:41:12 -0500 Subject: [PATCH] More ConstraintLayout --- .../magisk/adapters/ReposAdapter.java | 3 +- app/src/full/res/layout/list_item_module.xml | 115 ++++++------- app/src/full/res/layout/list_item_repo.xml | 153 ++++++++++-------- 3 files changed, 148 insertions(+), 123 deletions(-) diff --git a/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java b/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java index 3052b84e8..9f959f53b 100644 --- a/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java +++ b/app/src/full/java/com/topjohnwu/magisk/adapters/ReposAdapter.java @@ -10,7 +10,6 @@ import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.ImageView; -import android.widget.LinearLayout; import android.widget.TextView; import com.topjohnwu.core.container.Module; @@ -193,7 +192,7 @@ public class ReposAdapter extends SectionedAdapter + app:cardCornerRadius="@dimen/card_corner_radius" + app:cardElevation="@dimen/card_elevation"> - + android:paddingStart="10dp" + android:paddingTop="5dp" + android:paddingEnd="10dp" + android:paddingBottom="8dp"> + android:textIsSelectable="false" + app:layout_constraintBottom_toTopOf="@+id/version_name" + app:layout_constraintEnd_toStartOf="@+id/checkbox" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" /> + android:textStyle="bold|italic" + app:layout_constraintBottom_toTopOf="@+id/author" + app:layout_constraintEnd_toEndOf="@+id/title" + app:layout_constraintStart_toStartOf="@+id/title" + app:layout_constraintTop_toBottomOf="@+id/title" /> + android:textStyle="bold|italic" + app:layout_constraintBottom_toTopOf="@+id/description" + app:layout_constraintEnd_toEndOf="@+id/title" + app:layout_constraintStart_toStartOf="@+id/title" + app:layout_constraintTop_toBottomOf="@+id/version_name" /> + android:textIsSelectable="false" + app:layout_constraintBottom_toTopOf="@+id/notice" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="@+id/title" + app:layout_constraintTop_toBottomOf="@+id/author" /> + android:visibility="visible" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toStartOf="@+id/title" + app:layout_constraintTop_toBottomOf="@+id/description" /> - + android:layout_marginStart="5dp" + android:layout_marginEnd="5dp" + android:focusable="false" + app:layout_constraintBottom_toTopOf="@+id/description" + app:layout_constraintEnd_toStartOf="@+id/delete" + app:layout_constraintStart_toEndOf="@+id/title" + app:layout_constraintTop_toTopOf="parent" + tools:ignore="ContentDescription" /> + - - - - - - - + \ No newline at end of file diff --git a/app/src/full/res/layout/list_item_repo.xml b/app/src/full/res/layout/list_item_repo.xml index 7c1a0ee41..6a3364cfd 100644 --- a/app/src/full/res/layout/list_item_repo.xml +++ b/app/src/full/res/layout/list_item_repo.xml @@ -1,7 +1,5 @@ - + app:cardCornerRadius="@dimen/card_corner_radius" + app:cardElevation="@dimen/card_elevation"> - + android:paddingStart="10dp" + android:paddingTop="5dp" + android:paddingEnd="10dp" + android:paddingBottom="8dp"> - + + + + + + + + + + - - - - - - - - - - - - + app:layout_constraintBottom_toBottomOf="@+id/update_time" + app:layout_constraintEnd_toEndOf="@+id/title" + app:layout_constraintStart_toStartOf="@+id/title" + app:layout_constraintTop_toTopOf="@+id/title" /> + android:gravity="end" + android:tint="@color/icon_grey" + app:srcCompat="@drawable/ic_file_download_black" + app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintStart_toEndOf="@+id/title" + app:layout_constraintTop_toTopOf="parent" /> - +