Button OnClickListener not working
问题 I have a button, when I click a dialog box appears. The problem is, the setOnClickListener is not responding to my button. Here is my Java code: Button b1 = (Button) findViewById(R.id.button1); b1.setOnClickListener(usage); b2 = (Button) findViewById(R.id.button2); b2.setOnClickListener(price); b3 = (Button) findViewById(R.id.button3); b3.setOnClickListener(new OnClickListener() { public void onClick(View v) { System.out.println("Button3"); mainDialog3 = new Dialog(Advice.this); mainDialog3