LocalActivityManager startActivity - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for LocalActivityManager startActivity method.

This code example shows how to use the following methods:dispatchCreate, getActivity, startActivity
		 
		Bundle state = null;
        if (savedInstanceState != null) {
            state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
        } 
		mLocalActivityManager = new LocalActivityManager(getActivity(), true);
		mLocalActivityManager.dispatchCreate(state);
		//pass the mapActivityStartupBundle along to the MapActivity 
		Intent mapActivityIntent = new Intent(getActivity(), TandemActivitiesMapActivity.class);
		Bundle mapActivityStartupBundle = this.getArguments();
		mapActivityIntent.putExtras(mapActivityStartupBundle);
		mWindow = mLocalActivityManager.startActivity("mapActivity", mapActivityIntent);
		 
		//ensure this FragmentActivity takes key events, rather than the MapActivity 
		//getActivity().takeKeyEvents(true);	//note: doesn't work when MapActivity is in foreground 
		((TandemActivitiesActivityInterface)mLocalActivityManager.getActivity("mapActivity")).setContainingFragmentActivity(getActivity());
		//TODo try using .requestFocus(View.FOCUS_FORWARD); and return mTabContent.dispatchKeyEvent(event); instead of ^ perhaps?? 
	} 
	 
	@Override 
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
7
CodeRank
This code example shows how to use the following methods:startActivity
     
    public void startGroupActivity(String id, Intent intent)
    { 
    	contentViewLayout.removeAllViews();
    	 
    	View view = activityManager.startActivity(id, intent).getDecorView();
        contentViewLayout.addView(view, contentViewLayoutParams);
    } 
     
    public void setCurrentTab(int index)
    { 
    	bottomRadioGroup.check(index);
		startGroupActivity(titleList.get(index).toString(), (Intent)intentList.get(index));
    } 
     
    public int getCurrentTab() 
    { 
    	return bottomRadioGroup.getCheckedRadioButtonId();
    } 
     
5
CodeRank
This code example shows how to use the following methods:startActivity
This code example shows how to use the following methods:destroyActivity, getActivity, startActivity
			finish(); 
			return; 
		} 
 
		// Remove the child activity from the localActivityManager and from the list of child activities 
		manager.destroyActivity(history.get(index), true);
		history.remove(index);
 
		// Get the last started child activity and start it 
		index--;
		String lastId = history.get(index);
		Intent lastIntent = manager.getActivity(lastId).getIntent();
		Window newWindow = manager.startActivity(lastId, lastIntent);
 
		// Refrech the childActivityPlaceHodler 
		childActivityPlaceHolder.removeViewAt(0);
		childActivityPlaceHolder.addView(newWindow.getDecorView(), 0);
	} 
 
	/** 
5
CodeRank
This code example shows how to use the following methods:startActivity
            mListener.onTabChanged(tab);
        } 
    } 
     
    private void loadIntentContent(TabItem tab) {
        final Window win = mLocalActivityManager.startActivity(tab.getTag(), tab.getContentIntent());
        final View wd = win != null ? win.getDecorView() : null;
         
        if (mChildView != null && mChildView != wd) {
            if (mChildView.getParent() != null) {
                mContent.removeView(mChildView);
            } 
        } 
         
        if (mChildView != wd) {
            mChildView = wd;
            mContent.addView(mChildView, new ViewGroup.LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
        } 
    } 
     
5
CodeRank
This code example shows how to use the following methods:startActivity
 
	 
	public View getContentView(int index, Intent intent){
		contentViewLayout.removeAllViews();
		intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		View view = activityManager.startActivity(String.valueOf(index), intent).getDecorView();
//		view.setAnimation(AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left)); 
		contentViewLayout.addView(view, contentViewLayoutParams);
		 
		return contentViewLayout;
	} 
	 
	 
	public void jump(ViewAnimator mAnimator, Intent intent,String mId){
		jump(mAnimator, intent, mId,true, null);
	} 
	 
	public void jump(ViewAnimator mAnimator, Intent intent,String mId,Bundle bundle){
		jump(mAnimator, intent, mId,true, bundle);
	} 
5
CodeRank
This code example shows how to use the following methods:startActivity
 
	 
	public View getContentView(int index, Intent intent){
		contentViewLayout.removeAllViews();
		intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
		View view = activityManager.startActivity(String.valueOf(index), intent).getDecorView();
//		view.setAnimation(AnimationUtils.loadAnimation(this, android.R.anim.slide_in_left)); 
		contentViewLayout.addView(view, contentViewLayoutParams);
		 
		return contentViewLayout;
	} 
	 
	 
	public void jump(ViewAnimator mAnimator, Intent intent,String mId){
		jump(mAnimator, intent, mId,true, null);
	} 
	 
	public void jump(ViewAnimator mAnimator, Intent intent,String mId,Bundle bundle){
		jump(mAnimator, intent, mId,true, bundle);
	} 
5
CodeRank
This code example shows how to use the following methods:startActivity
//    	if(strId == "Sorry") lam.getActivity("Joke").finish(); 
    	 
	    // 利用したいActivityのインテントを生成 
	    //Intent intent = new Intent(getApplicationContext(), clazz); 
	    // lamを使いインテントからWindowを生成 
	    window = lam.startActivity(strId, intent);
	    //ViewGroup group = (ViewGroup)findViewById(R.id.layout); 
	     
	    // WindowのオブジェクトからView情報を取得しレイアウトにセットする 
	    group.addView(window.getDecorView());
	     
    } 
     
	//メニューから設定画面へ(もしものために実装) 
//	@Override 
//	public boolean onCreateOptionsMenu(Menu menu) { 
//		this.getMenuInflater().inflate(R.menu.menu, menu); 
//		return super.onCreateOptionsMenu(menu); 
//	} 
//	@Override 
4
CodeRank
This code example shows how to use the following methods:startActivity
		   menuBar.setButtonSelected(index, true);
	} 
	 
	private View getCurrentView(int index)
	{ 
		return manager.startActivity(
				index+"",
				viewList
				.get(index)
				.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
				.getDecorView();
	} 
	 
	 
	/* 
	 *  Tab 
	 */	 
	private void initialViews(){	 
		viewList.add(new Intent(this, MessageActivity.class));
		viewList.add(new Intent(this, FriendActivity.class));
4
CodeRank
This code example shows how to use the following methods:startActivity
 
	public static View getContentView(Intent mIntent) {
		if (mLocalActivityManager == null) {
			throw new IllegalStateException("Did you forget to call 'public void setup(LocalActivityManager activityGroup)'?");
		} 
		final Window w = mLocalActivityManager.startActivity(System.currentTimeMillis() + "", mIntent);
		final View wd = w != null ? w.getDecorView() : null;
		return wd;
	} 
 
} 
4
CodeRank

Related LocalActivityManager startActivity Questions & Answers:

startActivity Method Overview
Start a new activity running in the group.
See Code Examples for other Android LocalActivityManager Methods: