January 2017
Beginner to intermediate
624 pages
22h 42m
English
Now that you have the scene set up, it is time to make it do your bidding by moving parts of it around. You are going to animate the sun down below the horizon.
But before you start animating, you will want a few bits of information handy in your fragment. Inside of onCreateView(…), pull out a couple of views into fields on SunsetFragment.
Listing 32.6 Pulling out view references (SunsetFragment.java)
public class SunsetFragment extends Fragment {
private View mSceneView;
private View mSunView;
private View mSkyView; public static SunsetFragment newInstance() { return new SunsetFragment(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { ...Read now
Unlock full access