本文整理匯總了Java中android.support.v4.util.ArrayMap.keyAt方法的典型用法代碼示例。如果您正苦於以下問題:Java ArrayMap.keyAt方法的具體用法?Java ArrayMap.keyAt怎麽用?Java ArrayMap.keyAt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類android.support.v4.util.ArrayMap
的用法示例。
在下文中一共展示了ArrayMap.keyAt方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: findSiblingStyleByPosition
import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
public GridRangeStyle findSiblingStyleByPosition(int position) {
GridRangeStyle rangeStyle = null;
if (mParent != null) {
ArrayMap<Range<Integer>, GridRangeStyle> siblings = mParent.mChildren;
for (int i = 0, size = siblings.size(); i < size; i++) {
Range range = siblings.keyAt(i);
if (range.contains(position)) {
GridRangeStyle childRangeStyle = siblings.valueAt(i);
if (!childRangeStyle.equals(this)) {
rangeStyle = childRangeStyle;
}
break;
}
}
}
return rangeStyle;
}
示例2: setNameOverrides
import android.support.v4.util.ArrayMap; //導入方法依賴的package包/類
private void setNameOverrides(TransitionState state, ArrayMap<String, View> namedViews, boolean isEnd) {
int count = namedViews.size();
for (int i = 0; i < count; i++) {
String source = (String) namedViews.keyAt(i);
String target = FragmentTransitionCompat21.getTransitionName((View) namedViews.valueAt(i));
if (isEnd) {
setNameOverride(state.nameOverrides, source, target);
} else {
setNameOverride(state.nameOverrides, target, source);
}
}
}