samples/Support4Demos/src/main/java/com/example/android/supportv4/app/FragmentCustomAnimationSupport.java
@Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            View v = inflater.inflate(R.layout.hello_world, container, false);
            View tv = v.findViewById(R.id.text);
            ((TextView) tv).setText("Fragment #" + mNum);
            ViewCompat.setBackground(tv,
                    ContextCompat.getDrawable(getContext(), android.R.drawable.gallery_thumb));
            return v;
        }
/**
         * The Fragment's UI is just a simple text view showing its
         * instance number.
         */
The Fragment's UI is just a simple text view showing its
instance number.
The Fragment ' s UI is just a simple text view showing its instance number .
@Override
        public View onCreateView(LayoutInflater inflater, ViewGroup container,
                Bundle savedInstanceState) {
            View v = inflater.inflate(R.layout.hello_world, container, false);
            View tv = v.findViewById(R.id.text);
            ((TextView) tv).setText("Fragment #" + mNum);
            ViewCompat.setBackground(tv,
                    ContextCompat.getDrawable(getContext(), android.R.drawable.gallery_thumb));
            return v;
        }
@ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View v = inflater . inflate ( R . layout . hello_world , container , false ) ; View tv = v . findViewById ( R . id . text ) ; ( ( TextView ) tv ) . setText ( "Fragment #" + mNum ) ; ViewCompat . setBackground ( tv , ContextCompat . getDrawable ( getContext ( ) , android . R . drawable . gallery_thumb ) ) ; return v ; }
The Fragment's UI is just a simple text view showing its
 instance number.
The Fragment ' s UI is just a simple text view showing its instance number .