【发布时间】:2011-07-02 21:11:24
【问题描述】:
我有一个有 5 行的屏幕。每行有 3 个编辑文本。在第 5 行之后有一个复选框,在它下面有另一行有 3 个编辑文本。我希望,当我第一次打开我的应用程序时,第 6 行是不可见的,当用户选中复选框时,会出现该行。这可能吗?谢谢
final CheckBox checkbox = (CheckBox) findViewById(R.id.box);
checkbox.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
// Perform action on clicks, depending on whether it's now checked
if (((CheckBox) v).isChecked()) {
?????????????
} else {
???????????
}
}
});
【问题讨论】:
-
回答你的问题是的,有可能
-
有什么办法让它工作吗?:)
标签: android checkbox visibility