建立一个对话框我想添加一个监听器,但是应用程序崩溃了。出了什么问题?
private void Info(){
textview = (TextView) findViewById(R.id.textView1);
LayoutInflater li = LayoutInflater.from(this);
View view = li.inflate(R.layout.info, null);
final AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setView(view).create().show();
buttonInfo = (Button)findViewById(R.id.buttonInfo);
buttonInfo.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
}
});