按下按钮后出错
这个问题在这里已经有了答案:
试试这个代码
Button button1 = (Button) findViewById(R.id.button1);
button1.setOnClickListener(new View.OnClickListener() {
public void onClick(View v)
{
Toast.makeText(getApplicationContext(), "Button pressed.",Toast.LENGTH_LONG).show();
}
});
链接地址: http://www.djcxy.com/p/96819.html