Android Open Source - Android-FactsGame How To Play Activity






From Project

Back to project page Android-FactsGame.

License

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.

Java Source Code

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();
                    }
                }
            });
        }
    }
}




Java Source Code List

ie.iamshanedoyle.factsgame.Constants.java
ie.iamshanedoyle.factsgame.activities.GameActivity.java
ie.iamshanedoyle.factsgame.activities.HomeActivity.java
ie.iamshanedoyle.factsgame.activities.HowToPlayActivity.java
ie.iamshanedoyle.factsgame.activities.ScoresActivity.java
ie.iamshanedoyle.factsgame.adapters.ScoresAdapter.java
ie.iamshanedoyle.factsgame.models.Question.java
ie.iamshanedoyle.factsgame.models.Score.java
ie.iamshanedoyle.factsgame.views.CountdownTimerView.java
ie.iamshanedoyle.factsgame.views.DividerView.java