|  |  |  | 
|---|
|  |  |  | // 监听 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) | 
|---|
|  |  |  | //            } | 
|---|
|  |  |  | }) | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | alipayAmount.text=currentPrice.toString() | 
|---|
|  |  |  | wechatAmount.text=currentPrice.toString() | 
|---|
|  |  |  | // 处理点击事件,这里我们只是简单地展示一个 Toast | 
|---|
|  |  |  | Toast.makeText(this, "点击了: ${title}", Toast.LENGTH_SHORT).show() | 
|---|
|  |  |  | //        Toast.makeText(this, "点击了: ${title}", Toast.LENGTH_SHORT).show() | 
|---|
|  |  |  |  | 
|---|
|  |  |  | orderName = title | 
|---|
|  |  |  | orderType=title | 
|---|
|  |  |  | 
|---|
|  |  |  | private fun handleVipProtocolClick(){ | 
|---|
|  |  |  |  | 
|---|
|  |  |  | binding.protocolVip.setOnClickListener{ | 
|---|
|  |  |  | startContentActivity("privacy_policy", "VIP会员服务协议") | 
|---|
|  |  |  | startContentActivity("VIP会员服务协议", "VIP会员服务协议") | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | private fun startContentActivity(type: String, title: String) { | 
|---|
|  |  |  | val intent = Intent(this, ContentDetailActivity::class.java).apply { | 
|---|
|  |  |  | putExtra(ContentDetailActivity.EXTRA_CONTENT_TYPE, type) | 
|---|
|  |  |  | putExtra(ContentDetailActivity.ID, type) | 
|---|
|  |  |  | putExtra(ContentDetailActivity.EXTRA_TITLE, title) | 
|---|
|  |  |  | } | 
|---|
|  |  |  | startActivity(intent) | 
|---|