use of android.support.v4.app.FragmentActivity in project Douya by DreaminginCodeZH.
the class BroadcastAndCommentListResource method attachTo.
public static BroadcastAndCommentListResource attachTo(long broadcastId, Broadcast broadcast, Fragment fragment, String tag, int requestCode) {
FragmentActivity activity = fragment.getActivity();
BroadcastAndCommentListResource instance = FragmentUtils.findByTag(activity, tag);
if (instance == null) {
instance = newInstance(broadcastId, broadcast);
instance.targetAt(fragment, requestCode);
FragmentUtils.add(instance, activity, tag);
}
return instance;
}
use of android.support.v4.app.FragmentActivity in project Douya by DreaminginCodeZH.
the class BroadcastCommentListResource method attachTo.
public static BroadcastCommentListResource attachTo(long broadcastId, Fragment fragment, String tag, int requestCode) {
FragmentActivity activity = fragment.getActivity();
BroadcastCommentListResource instance = FragmentUtils.findByTag(activity, tag);
if (instance == null) {
instance = newInstance(broadcastId);
instance.targetAt(fragment, requestCode);
FragmentUtils.add(instance, activity, tag);
}
return instance;
}
use of android.support.v4.app.FragmentActivity in project Douya by DreaminginCodeZH.
the class BroadcastLikerListResource method attachTo.
public static BroadcastLikerListResource attachTo(long broadcastId, Fragment fragment, String tag, int requestCode) {
FragmentActivity activity = fragment.getActivity();
BroadcastLikerListResource instance = FragmentUtils.findByTag(activity, tag);
if (instance == null) {
instance = newInstance(broadcastId);
instance.targetAt(fragment, requestCode);
FragmentUtils.add(instance, activity, tag);
}
return instance;
}
use of android.support.v4.app.FragmentActivity in project GSYVideoPlayer by CarGuo.
the class CommonUtil method hideSupportActionBar.
public static void hideSupportActionBar(Context context, boolean actionBar, boolean statusBar) {
if (actionBar) {
AppCompatActivity appCompatActivity = CommonUtil.getAppCompActivity(context);
if (appCompatActivity != null) {
ActionBar ab = appCompatActivity.getSupportActionBar();
if (ab != null) {
ab.setShowHideAnimationEnabled(false);
ab.hide();
}
}
}
if (statusBar) {
if (context instanceof FragmentActivity) {
FragmentActivity fragmentActivity = (FragmentActivity) context;
fragmentActivity.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else {
CommonUtil.getAppCompActivity(context).getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
}
use of android.support.v4.app.FragmentActivity in project GSYVideoPlayer by CarGuo.
the class CommonUtil method showSupportActionBar.
public static void showSupportActionBar(Context context, boolean actionBar, boolean statusBar) {
if (actionBar) {
AppCompatActivity appCompatActivity = CommonUtil.getAppCompActivity(context);
if (appCompatActivity != null) {
ActionBar ab = appCompatActivity.getSupportActionBar();
if (ab != null) {
ab.setShowHideAnimationEnabled(false);
ab.show();
}
}
}
if (statusBar) {
if (context instanceof FragmentActivity) {
FragmentActivity fragmentActivity = (FragmentActivity) context;
fragmentActivity.getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
} else {
CommonUtil.getAppCompActivity(context).getWindow().clearFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}
}
Aggregations