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


Java ArrayMap.isEmpty方法代码示例

本文整理汇总了Java中android.support.v4.util.ArrayMap.isEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java ArrayMap.isEmpty方法的具体用法?Java ArrayMap.isEmpty怎么用?Java ArrayMap.isEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.support.v4.util.ArrayMap的用法示例。


在下文中一共展示了ArrayMap.isEmpty方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setEpicenterIn

import android.support.v4.util.ArrayMap; //导入方法依赖的package包/类
private void setEpicenterIn(ArrayMap<String, View> namedViews, TransitionState state) {
    if (this.mSharedElementTargetNames != null && !namedViews.isEmpty()) {
        View epicenter = (View) namedViews.get(this.mSharedElementTargetNames.get(0));
        if (epicenter != null) {
            state.enteringEpicenterView.epicenter = epicenter;
        }
    }
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:9,代码来源:BackStackRecord.java

示例2: remapNames

import android.support.v4.util.ArrayMap; //导入方法依赖的package包/类
private static ArrayMap<String, View> remapNames(ArrayList<String> inMap, ArrayList<String> toGoInMap, ArrayMap<String, View> namedViews) {
    if (namedViews.isEmpty()) {
        return namedViews;
    }
    ArrayMap<String, View> remappedViews = new ArrayMap();
    int numKeys = inMap.size();
    for (int i = 0; i < numKeys; i++) {
        View view = (View) namedViews.get(inMap.get(i));
        if (view != null) {
            remappedViews.put(toGoInMap.get(i), view);
        }
    }
    return remappedViews;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:15,代码来源:BackStackRecord.java

示例3: configureTransitions

import android.support.v4.util.ArrayMap; //导入方法依赖的package包/类
private boolean configureTransitions(int containerId, TransitionState state, boolean isBack, SparseArray<Fragment> firstOutFragments, SparseArray<Fragment> lastInFragments) {
    View sceneRoot = (ViewGroup) this.mManager.mContainer.onFindViewById(containerId);
    if (sceneRoot == null) {
        return false;
    }
    final Fragment inFragment = (Fragment) lastInFragments.get(containerId);
    Fragment outFragment = (Fragment) firstOutFragments.get(containerId);
    Object enterTransition = getEnterTransition(inFragment, isBack);
    Object sharedElementTransition = getSharedElementTransition(inFragment, outFragment, isBack);
    Object exitTransition = getExitTransition(outFragment, isBack);
    ArrayMap<String, View> namedViews = null;
    ArrayList<View> sharedElementTargets = new ArrayList();
    if (sharedElementTransition != null) {
        namedViews = remapSharedElements(state, outFragment, isBack);
        if (namedViews.isEmpty()) {
            sharedElementTransition = null;
            namedViews = null;
        } else {
            SharedElementCallback callback = isBack ? outFragment.mEnterTransitionCallback : inFragment.mEnterTransitionCallback;
            if (callback != null) {
                callback.onSharedElementStart(new ArrayList(namedViews.keySet()), new ArrayList(namedViews.values()), null);
            }
            prepareSharedElementTransition(state, sceneRoot, sharedElementTransition, inFragment, outFragment, isBack, sharedElementTargets);
        }
    }
    if (enterTransition == null && sharedElementTransition == null && exitTransition == null) {
        return false;
    }
    ArrayList<View> exitingViews = new ArrayList();
    exitTransition = captureExitingViews(exitTransition, outFragment, exitingViews, namedViews, state.nonExistentView);
    if (!(this.mSharedElementTargetNames == null || namedViews == null)) {
        View epicenterView = (View) namedViews.get(this.mSharedElementTargetNames.get(0));
        if (epicenterView != null) {
            if (exitTransition != null) {
                FragmentTransitionCompat21.setEpicenter(exitTransition, epicenterView);
            }
            if (sharedElementTransition != null) {
                FragmentTransitionCompat21.setEpicenter(sharedElementTransition, epicenterView);
            }
        }
    }
    ViewRetriever viewRetriever = new ViewRetriever() {
        public View getView() {
            return inFragment.getView();
        }
    };
    ArrayList<View> enteringViews = new ArrayList();
    ArrayMap<String, View> renamedViews = new ArrayMap();
    boolean allowOverlap = true;
    if (inFragment != null) {
        allowOverlap = isBack ? inFragment.getAllowReturnTransitionOverlap() : inFragment.getAllowEnterTransitionOverlap();
    }
    Object transition = FragmentTransitionCompat21.mergeTransitions(enterTransition, exitTransition, sharedElementTransition, allowOverlap);
    if (transition != null) {
        FragmentTransitionCompat21.addTransitionTargets(enterTransition, sharedElementTransition, sceneRoot, viewRetriever, state.nonExistentView, state.enteringEpicenterView, state.nameOverrides, enteringViews, namedViews, renamedViews, sharedElementTargets);
        excludeHiddenFragmentsAfterEnter(sceneRoot, state, containerId, transition);
        FragmentTransitionCompat21.excludeTarget(transition, state.nonExistentView, true);
        excludeHiddenFragments(state, containerId, transition);
        FragmentTransitionCompat21.beginDelayedTransition(sceneRoot, transition);
        FragmentTransitionCompat21.cleanupTransitions(sceneRoot, state.nonExistentView, enterTransition, enteringViews, exitTransition, exitingViews, sharedElementTransition, sharedElementTargets, transition, state.hiddenFragmentViews, renamedViews);
    }
    if (transition != null) {
        return true;
    }
    return false;
}
 
开发者ID:JackChan1999,项目名称:letv,代码行数:67,代码来源:BackStackRecord.java


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