Hello,
I have the following code that shows a panel. It displays a button on the panel but as soon as I assign a Click Handler to it the app crashes!
It crashes on the line .setOnClickListener
Button button = (Button)findViewById(R.id.buttonclick);
button.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
hide();
}
});
LogCat shows... 09-22 14:54:09.953: ERROR/Error(7786): java.lang.NullPointerException 09-22 14:54:09.953: ERROR/Error(7786): at com.pinkfroot.leefinder.leeFinderMain$PopupPanel.(leeFinderMain.java:598)
Adding a breakpoint further down shows that R.id.buttonclick has an id but button is null.