本文整理汇总了Java中android.widget.RadioButton.setClickable方法的典型用法代码示例。如果您正苦于以下问题:Java RadioButton.setClickable方法的具体用法?Java RadioButton.setClickable怎么用?Java RadioButton.setClickable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.widget.RadioButton
的用法示例。
在下文中一共展示了RadioButton.setClickable方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RadioButtonWithDescription
import android.widget.RadioButton; //导入方法依赖的package包/类
/**
* Constructor for inflating via XML.
*/
public RadioButtonWithDescription(Context context, AttributeSet attrs) {
super(context, attrs);
LayoutInflater.from(context).inflate(R.layout.radio_button_with_description, this, true);
mRadioButton = (RadioButton) findViewById(R.id.radio_button);
mTitle = (TextView) findViewById(R.id.title);
mDescription = (TextView) findViewById(R.id.description);
if (attrs != null) applyAttributes(attrs);
// We want RadioButtonWithDescription to handle the clicks itself.
mRadioButton.setClickable(false);
setOnClickListener(this);
}
示例2: setStreamButtonEnableByLevel
import android.widget.RadioButton; //导入方法依赖的package包/类
private void setStreamButtonEnableByLevel(int level) {
boolean z;
boolean z2 = true;
this.mLowButton.setClickable(level != 0);
RadioButton radioButton = this.mStandardButton;
if (level != 1) {
z = true;
} else {
z = false;
}
radioButton.setClickable(z);
radioButton = this.mHighButton;
if (level != 2) {
z = true;
} else {
z = false;
}
radioButton.setClickable(z);
radioButton = this.mSuperHighButton;
if (level != 3) {
z = true;
} else {
z = false;
}
radioButton.setClickable(z);
radioButton = this.m720Button;
if (level != 4) {
z = true;
} else {
z = false;
}
radioButton.setClickable(z);
RadioButton radioButton2 = this.m1080Button;
if (level == 5) {
z2 = false;
}
radioButton2.setClickable(z2);
}