Android Open Source - AndroidPINProtectionExample Terms Fragment






From Project

Back to project page AndroidPINProtectionExample.

License

The source code is released under:

GNU General Public License

If you think the Android project AndroidPINProtectionExample 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 com.example.pinexample.fragments;
//from   www .j av a 2 s  .co  m
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import com.example.pinexample.R;

/**
 * A test fragment
 * @author drakuwa
 *
 */
public final class TermsFragment extends Fragment {
  private static final String KEY_CONTENT = "TermsFragment:Content";
  private int mContent = -1;
  
  protected ViewGroup mapContainer;
  public static TermsFragment newInstance(int content) {
    TermsFragment fragment = new TermsFragment();

    fragment.mContent = content;
    return fragment;
  }

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    if ((savedInstanceState != null)
        && savedInstanceState.containsKey(KEY_CONTENT)) {
      mContent = savedInstanceState.getInt(KEY_CONTENT);
    }
  }

  @Override
  public View onCreateView(LayoutInflater inflater, ViewGroup container,
      Bundle savedInstanceState) {
    return inflater.inflate(R.layout.activity_terms, null);
  }

  @Override
  public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putInt(KEY_CONTENT, mContent);
  }
}




Java Source Code List

com.example.pinexample.fragments.CreatePinFragment.java
com.example.pinexample.fragments.TermsFragment.java
com.example.pinexample.fragments.WelcomeFragment.java
com.example.pinexample.ui.ChangePinActivity.java
com.example.pinexample.ui.MainFragmentActivity.java
com.example.pinexample.ui.PinActivity.java
com.example.pinexample.ui.StartActivity.java
com.example.pinexample.utilities.Log.java
com.example.pinexample.utilities.NumpadKeyboard.java
com.example.pinexample.utilities.Utilities.java