当前位置: 首页>>代码示例>>Java>>正文


Java FragmentTransaction.TRANSIT_FRAGMENT_OPEN属性代码示例

本文整理汇总了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);
}
 
开发者ID:tkrworks,项目名称:JinsMemeBRIDGE-Android,代码行数:19,代码来源:ConfigFragmentBase.java

示例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);
    }
}
 
开发者ID:LonelyMushroom,项目名称:aarLibrary,代码行数:26,代码来源:SupportFragment.java

示例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;
    }
}
 
开发者ID:wzx54321,项目名称:XinFramework,代码行数:34,代码来源:SupportFragmentDelegate.java

示例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);
}
 
开发者ID:sedstrom,项目名称:Witch-Android,代码行数:5,代码来源:MainActivity.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:42,代码来源:TableOfContents.java

示例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);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:42,代码来源:TableOfContents.java


注:本文中的android.support.v4.app.FragmentTransaction.TRANSIT_FRAGMENT_OPEN属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。