cloudroam
2025-04-02 1e6d955d13346ce89eb2819c86485eb6b122a8bb
app/src/main/java/com/example/firstapp/activity/VipActivity.kt
@@ -378,13 +378,6 @@
                    )
                }
//                setPadding(
//                    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20f, resources.displayMetrics).toInt(), // left padding
//                    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30f, resources.displayMetrics).toInt(), // top padding
//                    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 20f, resources.displayMetrics).toInt(), // right padding
//                    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30f, resources.displayMetrics).toInt()  // bottom padding
//                )
            }
            val textView = TextView(this).apply {
@@ -396,7 +389,8 @@
            val checkView = ImageView(this).apply {
                id = View.generateViewId()
                setImageResource(R.drawable.ic_check)
//                setImageResource(R.drawable.ic_check)
                setImageResource(R.mipmap.vip_right)
                layoutParams = ConstraintLayout.LayoutParams(
                    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30f, resources.displayMetrics).toInt(),
                    TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 30f, resources.displayMetrics).toInt()
@@ -416,14 +410,14 @@
                ConstraintSet.TOP,
                previousViewId,
                if (index == 0) ConstraintSet.TOP else ConstraintSet.BOTTOM,
                16
                32
            )
            constraintSet.connect(
                iconView.id,
                ConstraintSet.START,
                ConstraintSet.PARENT_ID,
                ConstraintSet.START,
                16
                32
            )
            // Text 位置
@@ -433,7 +427,7 @@
                ConstraintSet.START,
                iconView.id,
                ConstraintSet.END,
                8
                32
            )
            // Check 位置
@@ -443,7 +437,7 @@
                ConstraintSet.END,
                ConstraintSet.PARENT_ID,
                ConstraintSet.END,
                16
                32
            )
            constraintSet.applyTo(container)