Android : Null class variables implementing interface

on Saturday, September 6, 2014


I haven't found similar questions, so I'm writing a new one. I'm developing a little Android app and I have some problems with an interface. The app consists of 3 fragments and a ViewPager. Clicking a button, I show a custom dialog (made my extending the AlertDialog.Builder class). To retrieve data back from the target fragment, I made an interface that I implement in the fragment. Everything seems to work, but when I try to access fragment class variables inside the overridden methods, they are null! Class variables are initialized in onCreateView fragment method. Thanks


0 comments:

Post a Comment