This week's giveaway is in the Spring forum.
We're giving away four 3 month subscriptions to Marco Behler Videos and have Marco Behler on-line!
See this thread for details.
Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

why it gives me IllegalStateException when i click button on fragment  RSS feed

 
sam liya
Ranch Hand
Posts: 1264
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have app with viewpager.I need to call other fragment methon when i click button on first fragment.

this is my mail Activity




this is my fragment1



this is fragment2



this is myfragment_layout xml file




this is my_fragment2 xml filee




when i run the app it gives me the first fragment with a button.when i clcick button it gives me below error



The line which gives null pointer is below

 
Supun Lakshan Dissanayake
Ranch Hand
Posts: 137
Android Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems like is null.
It's bit hard to make a guess.
If you can send source code, I hope I'll be able to help you to solve this problem.
please check your private messages for my email address.

-Supun
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!