Back to project page Android-FactsGame.
The source code is released under:
Apache License
If you think the Android project Android-FactsGame listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package ie.iamshanedoyle.factsgame.activities; //from w ww . j a v a 2s. co m import android.app.Activity; import android.app.Fragment; import android.os.Bundle; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; import ie.iamshanedoyle.factsgame.R; /** * This activity represents that How To Play screen. */ public class HowToPlayActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_how_to_play); if (savedInstanceState == null) { getFragmentManager().beginTransaction() .add(R.id.container, new PlaceholderFragment()) .commit(); } } /** * 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) { return inflater.inflate(R.layout.fragment_how_to_play, container, false); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); if (getView() == null) { return; } TextView textViewHowTo = (TextView) getView().findViewById(R.id.textViewHowTo); textViewHowTo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if (getActivity() != null) { getActivity().onNavigateUp(); } } }); } } }