From 402934a6fb6defacab4e6f76c76850c1594710ba Mon Sep 17 00:00:00 2001 From: VishnuSanal Date: Wed, 7 Jun 2023 21:14:56 +0530 Subject: [PATCH 1/2] minor change to app manager UI Signed-off-by: VishnuSanal --- .../java/com/amaze/filemanager/adapters/AppsRecyclerAdapter.kt | 1 - .../java/com/amaze/filemanager/adapters/holders/AppHolder.kt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/app/src/main/java/com/amaze/filemanager/adapters/AppsRecyclerAdapter.kt b/app/src/main/java/com/amaze/filemanager/adapters/AppsRecyclerAdapter.kt index fa18dc62db..60460b7c2b 100644 --- a/app/src/main/java/com/amaze/filemanager/adapters/AppsRecyclerAdapter.kt +++ b/app/src/main/java/com/amaze/filemanager/adapters/AppsRecyclerAdapter.kt @@ -68,7 +68,6 @@ import com.amaze.filemanager.utils.AnimUtils.marqueeAfterDelay import com.amaze.filemanager.utils.Utils import com.amaze.filemanager.utils.safeLet import java.io.File -import kotlin.collections.ArrayList import kotlin.math.roundToInt class AppsRecyclerAdapter( diff --git a/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt b/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt index b14091a4c0..97bbd696b1 100644 --- a/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt +++ b/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt @@ -60,7 +60,7 @@ class AppHolder(view: View) : RecyclerView.ViewHolder(view) { packageName.visibility = View.VISIBLE val layoutParams = txtDesc.layoutParams as ViewGroup.MarginLayoutParams - layoutParams.setMargins(txtDesc.marginLeft, txtDesc.marginTop, 8, txtDesc.marginBottom) + layoutParams.setMargins(txtDesc.marginLeft, txtDesc.marginTop, 4, txtDesc.marginBottom) txtDesc.layoutParams = layoutParams view.findViewById(R.id.picture_icon).visibility = View.GONE From e536f9f37a64204748087822f51e2ae92d7c7d23 Mon Sep 17 00:00:00 2001 From: VishnuSanal Date: Fri, 23 Jun 2023 21:01:58 +0530 Subject: [PATCH 2/2] use Utils#dpToPx Signed-off-by: VishnuSanal --- .../com/amaze/filemanager/adapters/holders/AppHolder.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt b/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt index 97bbd696b1..f5ef96a37f 100644 --- a/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt +++ b/app/src/main/java/com/amaze/filemanager/adapters/holders/AppHolder.kt @@ -32,6 +32,7 @@ import androidx.core.view.marginTop import androidx.recyclerview.widget.RecyclerView import com.amaze.filemanager.R import com.amaze.filemanager.ui.views.ThemedTextView +import com.amaze.filemanager.utils.Utils class AppHolder(view: View) : RecyclerView.ViewHolder(view) { @JvmField @@ -60,7 +61,12 @@ class AppHolder(view: View) : RecyclerView.ViewHolder(view) { packageName.visibility = View.VISIBLE val layoutParams = txtDesc.layoutParams as ViewGroup.MarginLayoutParams - layoutParams.setMargins(txtDesc.marginLeft, txtDesc.marginTop, 4, txtDesc.marginBottom) + layoutParams.setMargins( + txtDesc.marginLeft, + txtDesc.marginTop, + Utils.dpToPx(view.context, 4), + txtDesc.marginBottom + ) txtDesc.layoutParams = layoutParams view.findViewById(R.id.picture_icon).visibility = View.GONE