- Bundle thisTabArguments = new Bundle();
- thisTabArguments.putInt("Tab", tab);
+ // Create a bundle.
+ Bundle bundle = new Bundle();
+
+ // Store the tab number in the bundle.
+ bundle.putInt("Tab", tab);
+
+ // Add the bundle to the fragment.
+ GuideTabFragment guideTabFragment = new GuideTabFragment();
+ guideTabFragment.setArguments(bundle);