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;
}
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);
}
}
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();
}
}
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();
}
}
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);
}
}
Aggregations