Skip to content

Instantly share code, notes, and snippets.

@nitindhar7
Created January 31, 2012 03:27
Show Gist options
  • Save nitindhar7/1708561 to your computer and use it in GitHub Desktop.
Save nitindhar7/1708561 to your computer and use it in GitHub Desktop.
Fragment - setting up objects to handle tab components
// Divide 1.0 by # of tabs needed
// In this case: 1.0/2 => 0.5
private static final LayoutParams params = new LinearLayout.LayoutParams(
LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT, 0.5f);
private static TabHost tabHost;
private static TabHost.TabSpec spec;
private static Intent intent;
private static LayoutInflater inflater;
private View tab;
private TextView label;
private TextView divider;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment