2013-04-02 59 views

回答

1

最好的辦法是延長SupportMapFragment並在那裏做所有的邏輯。

然後你可以使用FragmentPagerAdapter用的數據集ViewPager只需添加此片段:

class FrgInfo { 
    Class clss; 
    Bundle args; 
} 

並重寫getItem方法:

@Override 
public Fragment getItem(final int position) { 
    final FrgInfo info = fragments.get(position); 
    return Fragment.instantiate(context, info.clss.getName(), info.args); 
} 

這應該做的伎倆。

相關問題