Example usage for android.app LocalActivityManager LocalActivityManager

List of usage examples for android.app LocalActivityManager LocalActivityManager

Introduction

In this page you can find the example usage for android.app LocalActivityManager LocalActivityManager.

Prototype

public LocalActivityManager(Activity parent, boolean singleMode) 

Source Link

Document

Create a new LocalActivityManager for holding activities running within the given parent.

Usage

From source file:com.bignerdranch.android.mapfragment.LocalActivityManagerFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Bundle state = null;//from   w  ww  .ja  va  2s  .c  om
    if (savedInstanceState != null) {
        state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
    }

    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);
}

From source file:com.vanisty.maps.LocalActivityManagerFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    //        Log.d(TAG, "onCreate(): " + getClass().getSimpleName());

    Bundle state = null;//from  w w  w.  j  a va 2s  . c  om
    if (savedInstanceState != null) {
        state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
    }

    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);
}

From source file:com.dwdesign.tweetings.fragment.LocalActivityManagerFragment.java

@Override
public void onCreate(final Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Bundle state = null;//from  ww w  .  j  a v  a 2 s . c  om
    if (savedInstanceState != null) {
        state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
    }

    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);
}

From source file:com.cortxt.app.MMC.Activities.FragmentSupport.LocalActivityManagerFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    Log.d(TAG, "onCreate(): " + getClass().getSimpleName());

    Bundle state = null;// w w w  .  ja  va  2  s  .co m
    if (savedInstanceState != null) {
        state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
    }

    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);
}

From source file:com.app.controller.LocalActivityManagerFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    if (DEBUG)// w w w  .  j  ava2 s  . c  om
        Log.d(TAG, "onCreate(): " + getClass().getSimpleName());

    Bundle state = null;
    if (savedInstanceState != null) {
        state = savedInstanceState.getBundle(KEY_STATE_BUNDLE);
    }

    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);
}

From source file:com.mobilebank.develop.MultiplePageActivity.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);/*from   w w  w.  j av a2  s.c o  m*/
    localActivityManager = new LocalActivityManager(this, true);
    localActivityManager.dispatchCreate(savedInstanceState);
    initViewPager();
    firstBtn = (Button) findViewById(R.id.firstbtn);
    secondBtn = (Button) findViewById(R.id.secondbtn);
    firstBtn.setOnClickListener(this);
    secondBtn.setOnClickListener(this);
    //        back = (ImageView)findViewById(R.id.back);
    //        back.setOnClickListener(this);
}

From source file:edu.cmu.android.restaurant.MapFragment.java

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    Bundle state = null;//from   www  .j  a  va2  s .  c o  m
    if (savedInstanceState != null) {
        state = savedInstanceState.getBundle(TAG);
    }
    mLocalActivityManager = new LocalActivityManager(getActivity(), true);
    mLocalActivityManager.dispatchCreate(state);

}

From source file:org.zywx.wbpalmstar.plugin.uexiconlist.EUExIconList.java

/**
 * ??IconList view? ??/*w w  w .  j  a  v a2  s . c  o  m*/
 * 
 */
private void resetFrame() {
    ((Activity) mContext).runOnUiThread(new Runnable() {

        @Override
        public void run() {
            if (mgr == null) {
                mgr = new LocalActivityManager((Activity) mContext, false);
                mgr.dispatchCreate(null);
            }
            Activity activity = mgr.getActivity(IconListActivity.TAG);
            if (activity != null) {
                ViewGroup subView = (ViewGroup) activity.getWindow().getDecorView();
                if (IconListOption.isFollowWebRoll()) {
                    AbsoluteLayout.LayoutParams lParams = (LayoutParams) subView.getLayoutParams();
                    lParams.width = (int) UIConfig.getScaleWidth();
                    lParams.height = (int) UIConfig.getScaleHight();
                    lParams.x = (int) UIConfig.getScaleX();
                    lParams.y = (int) UIConfig.getScaleY();
                    //                        AbsoluteLayout.LayoutParams lp = new AbsoluteLayout.LayoutParams(
                    //                                (int) UIConfig.getScaleWidth(),
                    //                                (int) UIConfig.getScaleHight(),
                    //                                (int) UIConfig.getScaleX(),
                    //                                (int) UIConfig.getScaleY());
                    subView.setLayoutParams(lParams);
                } else {
                    FrameLayout.LayoutParams lParams = (FrameLayout.LayoutParams) subView.getLayoutParams();
                    lParams.width = (int) UIConfig.getScaleWidth();
                    lParams.height = (int) UIConfig.getScaleHight();
                    lParams.leftMargin = (int) UIConfig.getScaleX();
                    lParams.topMargin = (int) UIConfig.getScaleY();
                    // FrameLayout.LayoutParams lp = new
                    // FrameLayout.LayoutParams(
                    // (int) UIConfig.getScaleWidth(),
                    // (int) UIConfig.getScaleHight());
                    // lp.leftMargin = (int) UIConfig.getScaleX();
                    // lp.topMargin = (int) UIConfig.getScaleY();
                    subView.setLayoutParams(lParams);
                }
                subView.invalidate();
                mEuExIconListHandler.send2Callback(WHAT_RESET_FRAME, null);
            }
        }
    });
}

From source file:org.youaretheone.website.client.UoneSearchGsonActivity.java

private void setupViews(Bundle savedInstanceState) {
    content = (TextView) findViewById(R.id.content);
    content.setText(getString(R.string.search));

    userListView = ((ListView) findViewById(R.id.userlistview));
    userListAdapter = new UoneSearchResultListAdapter(this, this.results);
    userListView.setAdapter(userListAdapter);
    userListView.setOnItemClickListener(new OnItemClickListener() {

        @Override/*from  w ww .j av a2  s  .  c o  m*/
        public void onItemClick(AdapterView<?> parent, View view, final int position, long id) {
            if (results == null) {
                return;
            }

            UoneSearchResult result = results.get(position);
            startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(result.getUrl())));
        }
    });
    mMenuPanel = ((RelativeLayout) findViewById(R.id.menuPopup));
    mMenuPanel.setVisibility(View.GONE);

    mTabHost = (TabHost) findViewById(android.R.id.tabhost);
    mLocalActivityManager = new LocalActivityManager(this, false);
    mLocalActivityManager.dispatchCreate(savedInstanceState);
    mTabHost.setup(mLocalActivityManager);

    mTabHost.getTabWidget().setDividerDrawable(R.drawable.tab_divider);

    addMethodTab(new TextView(this), "Search", R.drawable.search);
    addMethodTab(new TextView(this), "Share", R.drawable.heart);
    addMethodTab(new TextView(this), "Website", R.drawable.globe);
    addActivityTab(new TextView(this), "Settings", R.drawable.tools,
            new Intent(this.getApplicationContext(), Settings.class));
    addMethodTab(new TextView(this), "Quit", R.drawable.power);

    mTabHost.setOnClickListener(new TabHost.OnClickListener() {

        @Override
        public void onClick(View arg0) {
            Log.e(TAG, "mTabHost.onClick()-----------1");
            checkTab();
        }
    });
    mTabHost.setOnTabChangedListener(new TabHost.OnTabChangeListener() {

        @Override
        public void onTabChanged(String arg0) {
            Log.e(TAG, "onTabChanged()-----------1");
            checkTab();
        }
    });
}

From source file:com.android.music.MusicBrowserActivity.java

public void onCreateContinue(Bundle savedInstanceState) {
    MusicLogUtils.d(TAG, "onCreate");
    ActionBar actionBar = getActionBar();
    actionBar.hide();// w w w  . j  av a2  s.  c  o m

    setVolumeControlStream(AudioManager.STREAM_MUSIC);

    PDebug.Start("MusicBrowserActivity.bindToService()");
    mToken = MusicUtils.bindToService(this, this);
    PDebug.End("MusicBrowserActivity.bindToService()");

    mMusicPlugin = Extensions.getPluginObject(getApplicationContext());

    mHasMenukey = ViewConfiguration.get(this).hasPermanentMenuKey();
    PDebug.Start("MusicBrowserActivity.dispatchCreate()");
    mActivityManager = new LocalActivityManager(this, false);
    mActivityManager.dispatchCreate(savedInstanceState);
    PDebug.End("MusicBrowserActivity.dispatchCreate()");

    mTabHost = getTabHost();
    PDebug.Start("MusicBrowserActivity.initTab()");
    initTab();
    PDebug.End("MusicBrowserActivity.initTab()");

    PDebug.Start("MusicBrowserActivity.setCurrentTab()");
    mCurrentTab = MusicUtils.getIntPref(this, SAVE_TAB, ARTIST_INDEX);
    MusicLogUtils.d(TAG, "onCreate mCurrentTab: " + mCurrentTab);
    if ((mCurrentTab < 0) || (mCurrentTab >= mTabCount)) {
        mCurrentTab = ARTIST_INDEX;
    }
    /// M: reset the defalt tab value
    if (mCurrentTab == ARTIST_INDEX) {
        mTabHost.setCurrentTab(ALBUM_INDEX);
    }
    mTabHost.setOnTabChangedListener(this);
    PDebug.End("MusicBrowserActivity.setCurrentTab()");

    PDebug.Start("MusicBrowserActivity.initPager()");
    initPager();
    PDebug.End("MusicBrowserActivity.initPager()");

    PDebug.Start("MusicBrowserActivity.setAdapter()");
    mViewPager = (ViewPager) findViewById(R.id.viewpage);
    mViewPager.setAdapter(new MusicPagerAdapter());
    mViewPager.setOnPageChangeListener(this);
    //mViewPager.setOffscreenPageLimit(VIEW_PAGER_OFFSCREEN_PAGE_NUM);
    PDebug.End("MusicBrowserActivity.setAdapter()");

    IntentFilter f = new IntentFilter();
    f.addAction(MusicUtils.SDCARD_STATUS_UPDATE);
    registerReceiver(mSdcardstatustListener, f);
    createFakeMenu();
    /// M: Init search button click listener in nowplaying.
    initSearchButton();
    PDebug.End("MusicBrowserActivity.onCreate");
}