本文整理汇总了Java中android.support.v4.app.FragmentTransaction.TRANSIT_FRAGMENT_OPEN属性的典型用法代码示例。如果您正苦于以下问题:Java FragmentTransaction.TRANSIT_FRAGMENT_OPEN属性的具体用法?Java FragmentTransaction.TRANSIT_FRAGMENT_OPEN怎么用?Java FragmentTransaction.TRANSIT_FRAGMENT_OPEN使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类android.support.v4.app.FragmentTransaction
的用法示例。
在下文中一共展示了FragmentTransaction.TRANSIT_FRAGMENT_OPEN属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onCreateAnimation
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
Animation anim = AnimationUtils.loadAnimation(getContext(), R.anim.config_in);
if (transit == FragmentTransaction.TRANSIT_FRAGMENT_OPEN) {
if (enter) {
return AnimationUtils.loadAnimation(getContext(), R.anim.config_in);
} else {
return AnimationUtils.loadAnimation(getContext(), R.anim.config_out2);
}
} else if (transit == FragmentTransaction.TRANSIT_FRAGMENT_CLOSE) {
if (enter) {
return AnimationUtils.loadAnimation(getContext(), R.anim.config_in);
} else {
return AnimationUtils.loadAnimation(getContext(), R.anim.config_out2);
}
}
return super.onCreateAnimation(transit, enter, nextAnim);
}
示例2: onCreateAnimation
@Override
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
if (_mActivity.mPopMultipleNoAnim || mLocking) {
if (transit == FragmentTransaction.TRANSIT_FRAGMENT_CLOSE && enter) {
return mAnimHelper.getNoneAnimFixed();
}
return mAnimHelper.getNoneAnim();
}
if (transit == FragmentTransaction.TRANSIT_FRAGMENT_OPEN) {
if (enter) {
if (mIsRoot) return mAnimHelper.getNoneAnim();
return mAnimHelper.enterAnim;
} else {
return mAnimHelper.popExitAnim;
}
} else if (transit == FragmentTransaction.TRANSIT_FRAGMENT_CLOSE) {
return enter ? mAnimHelper.popEnterAnim : mAnimHelper.exitAnim;
} else {
if (mIsSharedElement && enter) notifyNoAnim();
Animation fixedAnim = mAnimHelper.getViewPagerChildFragmentAnimFixed(this, enter);
if (fixedAnim != null) return fixedAnim;
return super.onCreateAnimation(transit, enter, nextAnim);
}
}
示例3: onCreateAnimation
public Animation onCreateAnimation(int transit, boolean enter, int nextAnim) {
if ((mSupport.getSupportDelegate().mPopMultipleNoAnim || mLockAnim)) {
if (transit == FragmentTransaction.TRANSIT_FRAGMENT_CLOSE && enter) {
return mAnimHelper.getNoneAnimFixed();
}
return mAnimHelper.getNoneAnim();
}
if (transit == FragmentTransaction.TRANSIT_FRAGMENT_OPEN) {
if (enter) {
Animation enterAnim;
if (mRootStatus == STATUS_ROOT_ANIM_DISABLE) {
enterAnim = mAnimHelper.getNoneAnim();
} else {
enterAnim = mAnimHelper.enterAnim;
fixAnimationListener(enterAnim);
}
return enterAnim;
} else {
return mAnimHelper.popExitAnim;
}
} else if (transit == FragmentTransaction.TRANSIT_FRAGMENT_CLOSE) {
return enter ? mAnimHelper.popEnterAnim : mAnimHelper.exitAnim;
} else {
if (mIsSharedElement && enter) {
compatSharedElements();
}
if (!enter) {
return mAnimHelper.compatChildFragmentExitAnim(mFragment);
}
return null;
}
}
示例4: addFragment
private void addFragment(Fragment fragment, String title, boolean displayHomeAsUp) {
models.add(new ViewModel(fragment, displayHomeAsUp, title));
transaction = FragmentTransaction.TRANSIT_FRAGMENT_OPEN;
Witch.spellBind(models.peek(), this);
}
示例5: remapTypeOrderId
private int remapTypeOrderId(int type) {
switch (type) {
case 0:
return 0;
case 1:
return 1;
case 2:
return 2;
case 3:
return 3;
case 4:
return 4;
case 5:
return 5;
case 6:
return 6;
case 4096:
return 17;
case FragmentTransaction.TRANSIT_FRAGMENT_OPEN /*4097*/:
return 8;
case InputDeviceCompat.SOURCE_TOUCHSCREEN /*4098*/:
return 11;
case FragmentTransaction.TRANSIT_FRAGMENT_FADE /*4099*/:
return 10;
case 8192:
return 15;
case 8193:
return 14;
case 8194:
return 7;
case 8195:
return 13;
case 8196:
return 9;
case 8197:
return 16;
case 8198:
return 12;
default:
throw new IllegalArgumentException("unknown section type: " + type);
}
}
示例6: getSectionByType
public Section getSectionByType(int type) {
switch (type) {
case 0:
return this.header;
case 1:
return this.stringIds;
case 2:
return this.typeIds;
case 3:
return this.protoIds;
case 4:
return this.fieldIds;
case 5:
return this.methodIds;
case 6:
return this.classDefs;
case 4096:
return this.mapList;
case FragmentTransaction.TRANSIT_FRAGMENT_OPEN /*4097*/:
return this.typeLists;
case InputDeviceCompat.SOURCE_TOUCHSCREEN /*4098*/:
return this.annotationSetRefLists;
case FragmentTransaction.TRANSIT_FRAGMENT_FADE /*4099*/:
return this.annotationSets;
case 8192:
return this.classDatas;
case 8193:
return this.codes;
case 8194:
return this.stringDatas;
case 8195:
return this.debugInfos;
case 8196:
return this.annotations;
case 8197:
return this.encodedArrays;
case 8198:
return this.annotationsDirectories;
default:
throw new IllegalArgumentException("unknown section type: " + type);
}
}