From a9673c6fa68cddc7c88005ccdadde60a189acdb5 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 13 Jun 2023 10:39:17 +0200 Subject: [PATCH] updating the UI at clipboard management activity --- app/build.gradle | 2 +- .../keyboard/adapters/ClipsActivityAdapter.kt | 2 ++ app/src/main/res/layout/item_clip_in_activity.xml | 5 +---- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a367c63..dd41e4a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -65,7 +65,7 @@ android { } dependencies { - implementation 'com.github.SimpleMobileTools:Simple-Commons:79c7cde543' + implementation 'com.github.SimpleMobileTools:Simple-Commons:c09f8dfda1' implementation 'androidx.emoji2:emoji2-bundled:1.2.0' kapt 'androidx.room:room-compiler:2.5.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsActivityAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsActivityAdapter.kt index 7e334ce..5ef709e 100644 --- a/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsActivityAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/keyboard/adapters/ClipsActivityAdapter.kt @@ -11,6 +11,7 @@ import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.dialogs.ConfirmationDialog import com.simplemobiletools.commons.extensions.applyColorFilter import com.simplemobiletools.commons.extensions.beVisibleIf +import com.simplemobiletools.commons.extensions.setupViewBackground import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.commons.interfaces.ItemMoveCallback import com.simplemobiletools.commons.interfaces.ItemTouchHelperContract @@ -154,6 +155,7 @@ class ClipsActivityAdapter( val isSelected = selectedKeys.contains(clip.id!!.toInt()) view.apply { + setupViewBackground(activity) clip_value.text = clip.value clip_value.setTextColor(textColor) clip_drag_handle.applyColorFilter(textColor) diff --git a/app/src/main/res/layout/item_clip_in_activity.xml b/app/src/main/res/layout/item_clip_in_activity.xml index 6a51a1f..d2dc680 100644 --- a/app/src/main/res/layout/item_clip_in_activity.xml +++ b/app/src/main/res/layout/item_clip_in_activity.xml @@ -4,10 +4,7 @@ android:id="@+id/clip_holder" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="?attr/selectableItemBackground" - android:clickable="true" - android:focusable="true" - android:foreground="@drawable/selector" + android:layout_marginBottom="@dimen/tiny_margin" android:paddingEnd="@dimen/normal_margin">