app/src/main/java/com/example/firstapp/activity/VipActivity.kt | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
app/src/main/res/layout/activity_vip.xml | ●●●●● 补丁 | 查看 | 原始文档 | 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"