January 2014
Intermediate to advanced
736 pages
70h 43m
English
Method onCreateView (Fig. 7.13) inflates the DoodleFragment’s GUI and initializes the instance variables. Like an Activity, a Fragment can place items in the app’s action bar and options menu. To do so, the Fragment must call its setHasOptionsMenu method with the argument true. If the parent Activity also has options menu items, then both the Activity’s and the Fragment’s items will be placed on the action bar and in the options menu (based on their settings).
31 // called when Fragment's view needs to be created32 @Override33 public View onCreateView(LayoutInflater inflater, ViewGroup container,34 Bundle savedInstanceState)35 {36 super ...
Read now
Unlock full access