Comfortable grid code cleanup

This commit is contained in:
arkon
2020-05-25 14:01:17 -04:00
parent 52e82b3548
commit 0af81c7d05
15 changed files with 92 additions and 105 deletions

View File

@@ -11,4 +11,4 @@
android:paddingTop="5dp"
android:paddingEnd="5dp"
android:paddingBottom="@dimen/action_toolbar_list_padding"
tools:listitem="@layout/source_grid_item" />
tools:listitem="@layout/source_compact_grid_item" />

View File

@@ -8,13 +8,12 @@
android:padding="4dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/rounded_rectangle">
android:layout_width="match_parent"
android:layout_height="wrap_content">
<FrameLayout
android:id="@+id/card"
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="220dp"
android:background="@drawable/rounded_rectangle"
app:layout_constraintEnd_toEndOf="parent"
@@ -29,13 +28,6 @@
tools:ignore="ContentDescription"
tools:src="@mipmap/ic_launcher" />
<View
android:id="@+id/gradient"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom"
android:background="@drawable/gradient_shape" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
@@ -116,15 +108,16 @@
style="@style/TextAppearance.Regular.Body1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|start|end"
android:ellipsize="end"
android:fontFamily="@font/ptsans_narrow_bold"
android:lineSpacingExtra="-4dp"
android:maxLines="2"
android:padding="8dp"
android:padding="4dp"
android:shadowColor="@color/textColorPrimaryLight"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/card"
tools:text="Sample name" />
</androidx.constraintlayout.widget.ConstraintLayout>
</FrameLayout>
</FrameLayout>

View File

@@ -8,4 +8,4 @@
android:clipToPadding="false"
android:columnWidth="140dp"
android:padding="5dp"
tools:listitem="@layout/source_grid_item" />
tools:listitem="@layout/source_compact_grid_item" />