Android LocalActivityManager - top ranked examples from Open Source projects

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

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:dispatchCreate
    Bundle state = null;
    if (savedInstanceState != null) {
      state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
    } 
 
    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);
  } 
 
  @Override 
  public void onSaveInstanceState(Bundle outState) {
    super.onSaveInstanceState(outState);
    outState.putBundle(KEY_STATE_BUNDLE, mLocalActivityManager.saveInstanceState());
  } 
 
  @Override 
  public void onResume() { 
    super.onResume(); 
    if (DEBUG)
      Log.d(TAG, "onResume(): " + getClass().getSimpleName());
6
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:dispatchCreate
		super.onCreate(savedInstanceState);
		 
		Bundle states = savedInstanceState != null
                ? savedInstanceState.getBundle(STATES_KEY) : null;
		 
		mLocalActivityManager = new LocalActivityManager(getActivity(), true);
		mLocalActivityManager.dispatchCreate(states);
	} 
 
	@Override 
	public abstract View onCreateView(LayoutInflater inflater, ViewGroup container,
			Bundle savedInstanceState);
 
	@Override 
	public void onActivityCreated(Bundle savedInstanceState) {
		// TODO Auto-generated method stub 
		LogUtils.d(TAG, "onActivityCreated");
		super.onActivityCreated(savedInstanceState);
	} 
 
4
CodeRank
This code example shows how to use the following methods:dispatchCreate
        Bundle state = null;
        if(savedInstanceState != null) {
            state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
        } 
         
        mLocalActivityManager = new LocalActivityManager(getActivity(), true);
        mLocalActivityManager.dispatchCreate(state);
    } 
     
    @Override 
    public void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
        outState.putBundle(KEY_STATE_BUNDLE, mLocalActivityManager.saveInstanceState());
    } 
     
    @Override 
    public void onResume() { 
        super.onResume(); 
        log("onResume(): " + getClass().getSimpleName());
        mLocalActivityManager.dispatchResume();
5
CodeRank
This code example shows how to use the following methods:dispatchCreate
		Bundle state = null;
		if (savedInstanceState != null) {
			state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
		} 
 
		mLocalActivityManager = new LocalActivityManager(getActivity(), true);
		mLocalActivityManager.dispatchCreate(state);
	} 
 
	@Override 
	public void onSaveInstanceState(Bundle outState) {
		super.onSaveInstanceState(outState);
		outState.putBundle(KEY_STATE_BUNDLE, mLocalActivityManager.saveInstanceState());
	} 
 
	@Override 
	public void onResume() { 
		super.onResume(); 
		Log.d(TAG, "onResume(): " + getClass().getSimpleName());
		mLocalActivityManager.dispatchResume();
5
CodeRank
This code example shows how to use the following methods:dispatchCreate

Related Android LocalActivityManager Questions & Answers:

See Code Examples for Android LocalActivityManager Methods: