Android Open Source - FlangeAssist Tabs Pager Adapter






From Project

Back to project page FlangeAssist.

License

The source code is released under:

MIT License

If you think the Android project FlangeAssist 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.atasoft.adapters;
/*from   w ww .  ja v a2  s  . c  o m*/
import com.atasoft.flangeassist.fragments.*;

//TODO: v13 once AIDE supports it
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

public class TabsPagerAdapter extends FragmentPagerAdapter {
  public static final String[] TABS = {"Flange\nTables", "Torque\nPattern", "CPI Raise\nEstimator", "Unit\nConverter", "Shape\nCalculator", "Welding\nReference","Cash\nCounter", "Rigging\nCalculator", "Nozzle\nCalculator"};
  public static int TAB_COUNT = TABS.length;
  
    public TabsPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int index) {

        switch (index) {
      case 0:
        // Flange Tables
        return new FlangeFragment();
      case 1:
        // Torque Pattern
        return new TorqueFragment();
      case 2:
        // CPI Raise Estimator
        return new WageCPIEstimate();
      case 3:
        // Unit Converter
        return new UnitConFragment();
      case 4:
        // Shape Calculator
        return new ShapeCalcFrag();
      case 5:
        // Welding Reference
        return new WeldingFrag();
      case 6:
        // Cash Counter
        return new CashCounter();
      case 7:
        // Rigging Calculator
        return new RigTrig();
      case 8:
        // Nozzle Calculator
        return new NozzleCalc();
    }

        return null;
    }

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




Java Source Code List

com.atasoft.adapters.ExListAd.java
com.atasoft.adapters.ExpandableGroup.java
com.atasoft.adapters.TabsPagerAdapter.java
com.atasoft.flangeassist.FragFramer.java
com.atasoft.flangeassist.MainActivity.java
com.atasoft.flangeassist.PreferenceMenu.java
com.atasoft.flangeassist.ToolsActivity.java
com.atasoft.flangeassist.fragments.AboutFragment.java
com.atasoft.flangeassist.fragments.CashCounter.java
com.atasoft.flangeassist.fragments.FlangeFragment.java
com.atasoft.flangeassist.fragments.HallFragment.java
com.atasoft.flangeassist.fragments.NozzleCalc.java
com.atasoft.flangeassist.fragments.PaychequeFragment.java
com.atasoft.flangeassist.fragments.RigTrig.java
com.atasoft.flangeassist.fragments.ShapeCalcFrag.java
com.atasoft.flangeassist.fragments.TorqueFragment.java
com.atasoft.flangeassist.fragments.UnitConFragment.java
com.atasoft.flangeassist.fragments.WageCPIEstimate.java
com.atasoft.flangeassist.fragments.WeldingFrag.java
com.atasoft.helpers.AtaMathUtils.java
com.atasoft.helpers.AtaTimePicker.java
com.atasoft.helpers.ConvDataHold.java
com.atasoft.helpers.JsonPuller.java
com.atasoft.helpers.ShapeCalcHold.java
com.atasoft.helpers.TaxManager.java