代码中控制Button的显示隐藏和禁用
发表于: 2012-05-07 作者:单眼皮小猪 来源:转载 浏览:
取消收藏
收藏
摘要: 设置Button属性
Button editbut = (Button)findViewById(R.id.editBtn);
editbut.setText("修 改");
editbut.setVisibility(View.VISIBLE);//显示按钮
editbut.setEnabled(false);//false:禁用按钮;true:不禁用
设置Button属性
Button editbut = (Button)findViewById(R.id.editBtn);
editbut.setText("修 改");
editbut.setVisibility(View.VISIBLE);//显示按钮
editbut.setEnabled(false);//false:禁用按钮;true:不禁用
View.VISIBLE:显示按钮
View.GONE;隐藏按钮
代码中控制Button的显示隐藏和禁用
-
0票

开心
-
0票

板砖
-
0票

感动
-
0票

有用
-
0票

疑问
-
0票

难过
-
0票

无聊
-
0票

震惊