答案 0 :(得分:1)
添加按钮为它们提供ID和变量,然后在需要时附加禁用。
Button button1, button2;
@Override
public void onCreate (Bundle savedInstanceState)
{
// do onCreate(); stuff
button1 = (Button)findViewById(R.id.button_problem_type);
button2 = (Button)findViewById(R.id.button_picture_type);
}
@Override
public void onActivityCreated( Bundle savedInstanceState )
{
super.onActivityCreated( savedInstanceState );
button1.setEnabled(false);
button2.setEnabled(false);
}