use the more modern long click UI

This commit is contained in:
tibbi 2023-06-20 18:34:47 +02:00
parent 0a059ee38c
commit f1e9ecc59d
5 changed files with 6 additions and 9 deletions

View File

@ -64,7 +64,7 @@ android {
} }
dependencies { dependencies {
implementation 'com.github.SimpleMobileTools:Simple-Commons:94b616f462' implementation 'com.github.SimpleMobileTools:Simple-Commons:b9309035a9'
implementation 'com.github.tibbi:PdfViewPager:d2af24208d' implementation 'com.github.tibbi:PdfViewPager:d2af24208d'
implementation 'com.github.Stericson:RootTools:df729dcb13' implementation 'com.github.Stericson:RootTools:df729dcb13'
implementation 'com.github.Stericson:RootShell:1.6' implementation 'com.github.Stericson:RootShell:1.6'

View File

@ -819,6 +819,7 @@ class ItemsAdapter(
item_section.setTextColor(textColor) item_section.setTextColor(textColor)
item_section.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize) item_section.setTextSize(TypedValue.COMPLEX_UNIT_PX, fontSize)
} else if (!listItem.isGridTypeDivider) { } else if (!listItem.isGridTypeDivider) {
setupViewBackground(activity)
item_frame.isSelected = isSelected item_frame.isSelected = isSelected
val fileName = listItem.name val fileName = listItem.name
item_name.text = if (textToHighlight.isEmpty()) fileName else fileName.highlightTextPart(textToHighlight, properPrimaryColor) item_name.text = if (textToHighlight.isEmpty()) fileName else fileName.highlightTextPart(textToHighlight, properPrimaryColor)

View File

@ -6,6 +6,7 @@ import com.simplemobiletools.commons.activities.BaseSimpleActivity
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
import com.simplemobiletools.commons.extensions.getPopupMenuTheme import com.simplemobiletools.commons.extensions.getPopupMenuTheme
import com.simplemobiletools.commons.extensions.getProperTextColor import com.simplemobiletools.commons.extensions.getProperTextColor
import com.simplemobiletools.commons.extensions.setupViewBackground
import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener import com.simplemobiletools.commons.interfaces.RefreshRecyclerViewListener
import com.simplemobiletools.commons.views.MyRecyclerView import com.simplemobiletools.commons.views.MyRecyclerView
import com.simplemobiletools.filemanager.pro.R import com.simplemobiletools.filemanager.pro.R
@ -59,6 +60,7 @@ class ManageFavoritesAdapter(
private fun setupView(view: View, favorite: String, isSelected: Boolean) { private fun setupView(view: View, favorite: String, isSelected: Boolean) {
view.apply { view.apply {
setupViewBackground(activity)
manage_favorite_title.apply { manage_favorite_title.apply {
text = favorite text = favorite
setTextColor(activity.getProperTextColor()) setTextColor(activity.getProperTextColor())

View File

@ -4,10 +4,7 @@
android:id="@+id/item_frame" android:id="@+id/item_frame"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground" android:layout_marginBottom="@dimen/tiny_margin"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/selector"
android:paddingTop="@dimen/tiny_margin" android:paddingTop="@dimen/tiny_margin"
android:paddingBottom="@dimen/tiny_margin"> android:paddingBottom="@dimen/tiny_margin">

View File

@ -4,10 +4,7 @@
android:id="@+id/manage_favorite_holder" android:id="@+id/manage_favorite_holder"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground" android:layout_marginBottom="@dimen/tiny_margin"
android:clickable="true"
android:focusable="true"
android:foreground="@drawable/selector"
android:paddingStart="@dimen/activity_margin" android:paddingStart="@dimen/activity_margin"
android:paddingEnd="0dp"> android:paddingEnd="0dp">