Back to project page FlangeAssist.
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.
package com.atasoft.flangeassist; //w w w. j av a2 s .co m import android.annotation.*; import android.app.*; import android.os.*; import com.atasoft.flangeassist.fragments.*; public class FragFramer extends Activity { public static final int PAY_CALC = 0; public static final int HALL = 1; public static final int ABOUT = 2; ActionBar actionBar; @SuppressLint("NewApi") @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.fragframer); actionBar = getActionBar(); actionBar.setHomeButtonEnabled(true); //int fragCode = getIntent().getIntExtra("launch_frag", 0); int fragCode = getIntent().getIntExtra("launch_frag", 0); launchFrag(fragCode); } private void launchFrag(int fragInt){ Fragment frag; String name; switch (fragInt){ case PAY_CALC: frag = new PaychequeFragment(); name = PaychequeFragment.NAME; break; case HALL: frag = new HallFragment(); name = HallFragment.NAME; break; default: frag = new AboutFragment(); name = AboutFragment.NAME; break; } if(getFragmentManager().findFragmentByTag(name) == null){ FragmentTransaction transaction = getFragmentManager().beginTransaction(); setTitle(name); transaction.add(R.id.fragframe, frag, name); transaction.commit(); } } }