PlaceholderFragment on Android

I am creating a new one Android Projectin Eclipseand I am only using version 19 SDK (Android 4.4). I did the same a few weeks ago, but today I noticed a difference. In my MainActivityown there is an automated inner class:

/**
 * A placeholder fragment containing a simple view.
 */
public static class PlaceholderFragment extends Fragment {

    public PlaceholderFragment() {
    }

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
            Bundle savedInstanceState) {
        View rootView = inflater.inflate(R.layout.fragment_main, container,
                false);
        return rootView;
    }
}

I tried to find documentation on this, but I can not find anything. Is there a reason for this? The next guide should be now Fragment?

+4
source share
2 answers

, Android appcompat version 7 lib. , . ui Placeholder. , 7.

+6

, , , , . .

, :), . .

+3

Source: https://habr.com/ru/post/1537600/


All Articles