tj
2025-04-02 b25b3dbd7d277731449f3b4fca089fb017828eb3
1.vip续费页面-勾选协议复选框修改
已修改2个文件
25 ■■■■■ 文件已修改
app/src/main/java/com/example/firstapp/activity/VipActivity.kt 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/res/layout/activity_vip.xml 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
app/src/main/java/com/example/firstapp/activity/VipActivity.kt
@@ -111,11 +111,11 @@
        // 监听 RadioButton 选中状态
        protocol.setOnCheckedChangeListener(CompoundButton.OnCheckedChangeListener { buttonView, isChecked ->
            isPaymentSelected = isChecked // 更新全局变量
            if(isChecked){
                protocol.background = ContextCompat.getDrawable(this, R.drawable.checkbox_round_selected)
            }else{
                protocol.background = ContextCompat.getDrawable(this, R.drawable.checkbox_round)
            }
//            if(isChecked){
//                protocol.background = ContextCompat.getDrawable(this, R.drawable.checkbox_round_selected)
//            }else{
//                protocol.background = ContextCompat.getDrawable(this, R.drawable.checkbox_round)
//            }
        })
    }
app/src/main/res/layout/activity_vip.xml
@@ -464,17 +464,22 @@
                android:baselineAligned="false"
                >
<!--                <CheckBox-->
<!--                    android:id="@+id/protocol_checkbox"-->
<!--                    android:layout_width="20dp"-->
<!--                    android:layout_height="20dp"-->
<!--                    android:text=""-->
<!--                    android:orientation="horizontal"-->
<!--                    android:gravity="start"-->
<!--                    />-->
                <CheckBox
                    android:id="@+id/protocol_checkbox"
                    android:layout_width="20dp"
                    android:layout_height="20dp"
                    android:text=""
                    android:orientation="horizontal"
                    android:gravity="start"
                    android:button="@null"
                    android:background="@drawable/checkbox_round"
                    />
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"