異なるカテゴリの6つのフラグメントがあり、アクティビティA ....アクティビティAには、6つのフラグメントが指定されたカテゴリのドロップダウンリストがあります。私の質問は、ドロップダウンItemListからカテゴリの3番目の位置をクリックしたときに3番目のフラグメントに移動する方法です。 ..助けてください......よろしくお願いします..。
public class MissMaliniActivity extends FragmentActivity{
/** Called when the activity is first created. */
private PagerAdapter1 mPagerAdapter;
private ViewPager mPager;
List<Fragment> fragments = new Vector<Fragment>();
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.latest_list2);
fragments.add((Fragment.instantiate(this,Home.class.getName())));
fragments.add(Fragment.instantiate(this,Bollywood.class.getName()));
fragments.add(Fragment.instantiate(this,Fashion.class.getName()));
fragments.add(Fragment.instantiate(this,Lifestyle.class.getName()));
fragments.add(Fragment.instantiate(this,GeekChic.class.getName()));
fragments.add(Fragment.instantiate(this,Contests.class.getName()));
this.mPagerAdapter = new PagerAdapter1(super.getSupportFragmentManager(),fragments);
mPager = (ViewPager) super.findViewById(R.id.viewpager);
mPager.setAdapter(this.mPagerAdapter);
mPager.setOffscreenPageLimit(2);
}
クラスのドロップダウンはアクティビティを拡張します
tblHome.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
_____>>>>How to go 3rd Fragment... which code here?? <<<_____
}
});