Code example for LocalActivityManager

Methods: dispatchCreate

0
 
	protected void _create(Bundle savedInstanceState, Context context) {
		mContext = context;
		mPager = getViewPager();
		mTabHost = getTabHost();
		manager = new LocalActivityManager(this, true);
		manager.dispatchCreate(savedInstanceState);
		DisplayMetrics metric = new DisplayMetrics();
		getWindowManager().getDefaultDisplay().getMetrics(metric);
		pageWidth = metric.widthPixels;
		tpadp = new TabPagerAdapter(views);
		mPager.setAdapter(tpadp);
		mPager.setOnPageChangeListener(new TabOnPageChangeListener());
	} 
 
	// 添加新页面 
	@SuppressWarnings("rawtypes") 
	public void AddActivity(String title, Class t) {
		AddActivity(title,t,null);
	}