Simplified satellite entry item layout, enabled R8 full mode

This commit is contained in:
Arty Bishop committed 2021-11-17 19:40:26 +00:00
1 parent 524a791629
commit 7f5d205e4b
5 files changed
+15 -52

No files matched your search

@@ -57,7 +57,7 @@ class EntriesAdapter(private val clickListener: EntriesClickListener) :
RecyclerView.ViewHolder(binding.root) { RecyclerView.ViewHolder(binding.root) {
fun bind(item: SatItem, listener: EntriesClickListener) { fun bind(item: SatItem, listener: EntriesClickListener) {
binding.entryName.text = item.name binding.entryCheckbox.text = item.name
binding.entryCheckbox.isChecked = item.isSelected binding.entryCheckbox.isChecked = item.isSelected
itemView.setOnClickListener { itemView.setOnClickListener {
listener.updateSelection(listOf(item.catnum), item.isSelected.not()) listener.updateSelection(listOf(item.catnum), item.isSelected.not())
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> <layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item <item>
android:left="8dp"
android:right="8dp">
<shape android:shape="rectangle"> <shape android:shape="rectangle">
<size <size
android:width="1dp" android:width="1dp"
+9 -46
View File
@@ -1,48 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView xmlns:android="http://schemas.android.com/apk/res/android" <CheckBox xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" android:id="@+id/entry_checkbox"
android:id="@+id/entry_card"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="36dp"
app:cardBackgroundColor="@color/greyDark" android:background="@null"
app:cardCornerRadius="8dp" android:ellipsize="end"
app:cardElevation="0dp"> android:lines="1"
android:text="@string/placeholder"
<androidx.constraintlayout.widget.ConstraintLayout android:textColor="@color/greyLight"
android:id="@+id/entry_root" android:textSize="16sp" />
android:layout_width="match_parent"
android:layout_height="match_parent">
<TextView
android:id="@+id/entry_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginEnd="4dp"
android:layout_marginBottom="8dp"
android:ellipsize="end"
android:maxLines="1"
android:text="@string/placeholder"
android:textColor="@color/greyLight"
android:textSize="16sp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/entry_checkbox"
app:layout_constraintTop_toTopOf="parent" />
<CheckBox
android:id="@+id/entry_checkbox"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginStart="4dp"
android:clickable="false"
android:minWidth="0dp"
android:minHeight="0dp"
app:layout_constraintBottom_toBottomOf="@+id/entry_name"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/entry_name" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
+2 -2
View File
@@ -1,10 +1,10 @@
buildscript { buildscript {
ext { ext {
gradle_version = '7.0.3' gradle_version = '7.0.3'
kotlin_version = '1.5.31' kotlin_version = '1.6.0'
coroutines_version = '1.5.2-native-mt' coroutines_version = '1.5.2-native-mt'
splash_screen_version = '1.0.0-alpha01' splash_screen_version = '1.0.0-alpha01'
constraint_layout_version = '2.1.1' constraint_layout_version = '2.1.2'
lifecycle_version = '2.4.0' lifecycle_version = '2.4.0'
navigation_version = '2.3.5' navigation_version = '2.3.5'
preference_version = '1.1.1' preference_version = '1.1.1'
+2
View File
@@ -20,3 +20,5 @@ android.enableJetifier=true
# Kotlin code style for this project: "official" or "obsolete": # Kotlin code style for this project: "official" or "obsolete":
kotlin.code.style=official kotlin.code.style=official
kapt.use.worker.api=true kapt.use.worker.api=true
# Enable more aggressive optimizations
android.enableR8.fullMode=true