If you get a NullPointerException because the view returned by findViewById() is of type NoSaveStateFrameLayout, I am guessing you called the findViewById() method from within the overriden onViewCreated() method in the Fragment class that you extended by using the View parameter.

The solution to getting the correct View is to use the Fragment‘s getActivity() method instead.

Do this and you should be fine.

Related Posts Plugin for WordPress, Blogger...