Android Open Source - AndroidPINProtectionExample Welcome 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;
//  w  w  w.  j a  v  a2s. c o 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 welcome fragment
 * @author bojan.i
 *
 */
public final class WelcomeFragment extends Fragment {
  private static final String KEY_CONTENT = "WelcomeFragment:Content";
  private int mContent = -1;
  
  protected ViewGroup mapContainer;
  public static WelcomeFragment newInstance(int content) {
    WelcomeFragment fragment = new WelcomeFragment();

    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_welcome, 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