Skip to content

Commit

Permalink
use Utils#dpToPx
Browse files Browse the repository at this point in the history
Signed-off-by: VishnuSanal <[email protected]>
  • Loading branch information
VishnuSanal committed Jun 23, 2023
1 parent 402934a commit e536f9f
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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<ImageView>(R.id.picture_icon).visibility = View.GONE
Expand Down

0 comments on commit e536f9f

Please sign in to comment.