Android Open Source - face_rec_android Help Activity






From Project

Back to project page face_rec_android.

License

The source code is released under:

GNU General Public License

If you think the Android project face_rec_android 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 in.amolgupta.helpingfaceless.activities;
//from   www  . ja v  a2s.  c  om
import in.amolgupta.helpingfaceless.R;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.ActionBarActivity;

public class HelpActivity extends FragmentActivity {

  public static final int NUM_PAGES = 5;
  private ViewPager mPager;
  private PagerAdapter mPagerAdapter;

  @Override
  protected void onCreate(Bundle arg0) {

    setContentView(R.layout.fragment_help);
    super.onCreate(arg0);
    mPager = (ViewPager) findViewById(R.id.pager);
    mPagerAdapter = new ScreenSlidePagerAdapter(getSupportFragmentManager());
    mPager.setAdapter(mPagerAdapter);
  }

  @Override
  public void onBackPressed() {
    if (mPager.getCurrentItem() == 0) {
      // If the user is currently looking at the first step, allow the
      // system to handle the
      // Back button. This calls finish() on this activity and pops the
      // back stack.
      super.onBackPressed();
    } else {
      // Otherwise, select the previous step.
      mPager.setCurrentItem(mPager.getCurrentItem() - 1);
    }
  }

  /**
   * A simple pager adapter that represents 5 ScreenSlidePageFragment objects,
   * in sequence.
   */
  private class ScreenSlidePagerAdapter extends FragmentStatePagerAdapter {
    public ScreenSlidePagerAdapter(FragmentManager fm) {
      super(fm);
    }

    @Override
    public Fragment getItem(int position) {
      return new HelpItemFragment(position);
    }

    @Override
    public int getCount() {
      return NUM_PAGES;
    }
  }
}




Java Source Code List

in.amolgupta.helpingfaceless.Views.Fragment.DashboardFragment.java
in.amolgupta.helpingfaceless.activities.HFBaseActivity.java
in.amolgupta.helpingfaceless.activities.HelpActivity.java
in.amolgupta.helpingfaceless.activities.HelpItemFragment.java
in.amolgupta.helpingfaceless.activities.HomeActivity.java
in.amolgupta.helpingfaceless.activities.ImageFragment.java
in.amolgupta.helpingfaceless.activities.PledgeFragment.java
in.amolgupta.helpingfaceless.activities.SetupActivity.java
in.amolgupta.helpingfaceless.activities.SigningActivity.java
in.amolgupta.helpingfaceless.activities.UploadForm.java
in.amolgupta.helpingfaceless.common.App.java
in.amolgupta.helpingfaceless.common.Constants.java
in.amolgupta.helpingfaceless.entities.ImageData.java
in.amolgupta.helpingfaceless.entities.NavItem.java
in.amolgupta.helpingfaceless.entities.TaskDetails.java
in.amolgupta.helpingfaceless.parser.CrowsourceDataParser.java
in.amolgupta.helpingfaceless.services.SendCSResponse.java
in.amolgupta.helpingfaceless.utils.ET.java
in.amolgupta.helpingfaceless.utils.LocationRequestData.java
in.amolgupta.helpingfaceless.utils.RequestUtils.java