更新时间:2023-02-02 20:48:32
在 onClick()
内部执行
sharedPreferences.edit().putBoolean("bntChecked", rdoMale.isChecked()).apply();
"btnChecked"
将是您使用sharedPreferences获取单选按钮状态的键
And "btnChecked"
will be the key that you will use to get the status of your radio button using sharedPreferences