Android Open Source - Android-2DViewPager Pager Activity






From Project

Back to project page Android-2DViewPager.

License

The source code is released under:

Apache License

If you think the Android project Android-2DViewPager 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 co.bytera.twodimensionalviewpager;
//from   ww  w  . j a v a 2 s .c  o m
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import co.bytera.twodimensionalviewpager.R;
import co.bytera.twodimensionalviewpager.fragment.TwoDimensionalViewPagerFragment;

public class PagerActivity extends FragmentActivity {

  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_fragment);
    
    /*
     * Assign fragment into fragmentContainer in the activity layout
     */
    FragmentManager fm = getSupportFragmentManager();
    Fragment fragment = fm.findFragmentById(R.id.fragmentContainer);
    
    if(fragment == null) {
      fragment = new TwoDimensionalViewPagerFragment();
      fm.beginTransaction().add(R.id.fragmentContainer, fragment)
      .commit();
    }
  }

}




Java Source Code List

co.bytera.twodimensionalviewpager.MainActivity.java
co.bytera.twodimensionalviewpager.PagerActivity.java
co.bytera.twodimensionalviewpager.adapter.DepthPageTransformer.java
co.bytera.twodimensionalviewpager.adapter.TwoDimensionalViewPagerAdapter.java
co.bytera.twodimensionalviewpager.adapter.ZoomOutPageTransformer.java
co.bytera.twodimensionalviewpager.fragment.TwoDimensionalViewPagerFragment.java