• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

NullPointerException in DatePickerDialog

 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
this is my DatePickerDialog code.



exception is below.


as show in above exception line is
btnSelectDate.setText("Date selected : " + day + "-" + month + "-"
anyway i have already initialize the button.

btnSelectDate = (Button) findViewById(R.id.btnMyshiftDate);
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sam liyanage wrote:anyway i have already initialize the button.

btnSelectDate = (Button) findViewById(R.id.btnMyshiftDate);

So what happens if that code returns null I wonder? I wonder why that code would return null? Hmm...
 
sam liya
Ranch Hand
Posts: 1243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks.its ok now
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic