8

Android: Should I add an empty constructor to a fragment used in ViewPager

view full story
linux-howto

http://stackoverflow.com – I'm making a layout, similar to Google play's. I'm using a ViewPager which requires fragments. I'm getting a little confused now because some sites say that a fragment requires an empty constructor, but the example on developer.android.com doesn't contain a constructor. There code is just like this: public static class DemoObjectFragment extends Fragment { public static final String ARG_OBJECT = "object"; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // The last two arguments ensure LayoutParams a (HowTos)