Search in sources :

Example 16 with FragmentManager

use of android.support.v4.app.FragmentManager in project glide by bumptech.

the class RequestManagerRetriever method handleMessage.

@Override
public boolean handleMessage(Message message) {
    boolean handled = true;
    Object removed = null;
    Object key = null;
    switch(message.what) {
        case ID_REMOVE_FRAGMENT_MANAGER:
            android.app.FragmentManager fm = (android.app.FragmentManager) message.obj;
            key = fm;
            removed = pendingRequestManagerFragments.remove(fm);
            break;
        case ID_REMOVE_SUPPORT_FRAGMENT_MANAGER:
            FragmentManager supportFm = (FragmentManager) message.obj;
            key = supportFm;
            removed = pendingSupportRequestManagerFragments.remove(supportFm);
            break;
        default:
            handled = false;
            break;
    }
    if (handled && removed == null && Log.isLoggable(TAG, Log.WARN)) {
        Log.w(TAG, "Failed to remove expected request manager fragment, manager: " + key);
    }
    return handled;
}
Also used : FragmentManager(android.support.v4.app.FragmentManager)

Example 17 with FragmentManager

use of android.support.v4.app.FragmentManager in project glide by bumptech.

the class RequestManagerRetriever method get.

public RequestManager get(FragmentActivity activity) {
    if (Util.isOnBackgroundThread()) {
        return get(activity.getApplicationContext());
    } else {
        assertNotDestroyed(activity);
        FragmentManager fm = activity.getSupportFragmentManager();
        return supportFragmentGet(activity, fm, null);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager)

Example 18 with FragmentManager

use of android.support.v4.app.FragmentManager in project platform_frameworks_base by android.

the class RvCompatListActivity method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FragmentManager fm = getSupportFragmentManager();
    if (fm.findFragmentById(android.R.id.content) == null) {
        RecyclerViewFragment fragment = new RecyclerViewFragment();
        fragment.layoutManager = createLayoutManager(this);
        fragment.adapter = createAdapter();
        fm.beginTransaction().add(android.R.id.content, fragment).commit();
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager)

Example 19 with FragmentManager

use of android.support.v4.app.FragmentManager in project httpclient by pixmob.

the class LoaderCustomSupport method onCreate.

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    FragmentManager fm = getSupportFragmentManager();
    // Create the list fragment and add it as our sole content.
    if (fm.findFragmentById(android.R.id.content) == null) {
        AppListFragment list = new AppListFragment();
        fm.beginTransaction().add(android.R.id.content, list).commit();
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager)

Example 20 with FragmentManager

use of android.support.v4.app.FragmentManager in project ListenerMusicPlayer by hefuyicoder.

the class QuickControlsFragment method onPlayQueueClick.

@OnClick(R.id.ic_play_queue)
public void onPlayQueueClick() {
    FragmentManager fm = getActivity().getSupportFragmentManager();
    if (bottomDialogFragment == null) {
        bottomDialogFragment = new PlayqueueDialog();
    }
    bottomDialogFragment.show(fm, "fragment_bottom_dialog");
    if (mSwatch != null) {
        bottomDialogFragment.setPaletteSwatch(mSwatch);
    }
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) PlayqueueDialog(io.hefuyi.listener.ui.dialogs.PlayqueueDialog) OnClick(butterknife.OnClick)

Aggregations

FragmentManager (android.support.v4.app.FragmentManager)293 FragmentTransaction (android.support.v4.app.FragmentTransaction)106 Fragment (android.support.v4.app.Fragment)99 View (android.view.View)53 TextView (android.widget.TextView)35 Bundle (android.os.Bundle)31 OnClickListener (android.view.View.OnClickListener)24 DialogFragment (android.support.v4.app.DialogFragment)23 Intent (android.content.Intent)20 ImageView (android.widget.ImageView)16 ScrollView (android.widget.ScrollView)14 ListFragment (android.support.v4.app.ListFragment)12 Button (android.widget.Button)11 ArrayList (java.util.ArrayList)9 FrontPageFragment (ingage.ingage20.fragments.FrontPageFragment)8 SearchResultFragment (ingage.ingage20.fragments.SearchResultFragment)8 ViewPager (android.support.v4.view.ViewPager)7 ActionBar (android.support.v7.app.ActionBar)7 RecyclerView (android.support.v7.widget.RecyclerView)7 CategoriesPageFragment (ingage.ingage20.fragments.CategoriesPageFragment)7