In an Android application I have a fragment implemented that overrides onViewCreated to set up some OnClickListeners once the view is there.
This all works fine when I implement. However as soon as I add the compatibility library v4 r3 it seems that the method is not called at all.
For now I am migrating my setup into onResume but that is really not ideal. So here are my questions:
Is this a bug in the compatibility library?
Is there a better workaround?
After some more digging and trying different things I got this stacktrace, which lets me believe it is indeed a bug in the compatibility library.
10-07 14:25:11.130: ERROR/AndroidRuntime(2964): FATAL EXCEPTION: main
java.lang.NoSuchMethodError: android.support.v4.app.Fragment.onViewCreated
at roboguice.fragment.RoboFragment.onViewCreated(RoboFragment.java:18)
But even more weirdly. Looking at the compatibility library source that method is actually there but it is empty.