我已经在Android项目的Android的onClick方法
clr=(Button)findViewById(R.id.Button01);
clr.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
tv1.setText("CLR");
et1.setText("");
refrigerant = "";
pres = "";
temperature = "";
superheat_oda = 0;
sub_cool = 0;
}
});
2种的onclick方法,我有onther的onClick方法中,我要直接打电话
prs=(Button)findViewById(R.id.Button02);
prs.setOnClickListener(new OnClickListener() {
----- I have to call that method---
}
});
该方法是否有此任何解决方案?
我建议你遵循'benvd'建议,但仍然为了它, 在Listener中使用'clr.performClick()'。 – st0le 2010-09-17 09:31:21