本文整理汇总了Java中android.support.v7.widget.RecyclerView.LayoutParams.isItemChanged方法的典型用法代码示例。如果您正苦于以下问题:Java LayoutParams.isItemChanged方法的具体用法?Java LayoutParams.isItemChanged怎么用?Java LayoutParams.isItemChanged使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.support.v7.widget.RecyclerView.LayoutParams
的用法示例。
在下文中一共展示了LayoutParams.isItemChanged方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: prependToSpan
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void prependToSpan(View view, OrientationHelper helper) {
LayoutParams lp = getLayoutParams(view);
mViews.add(0, view);
mCachedStart = INVALID_LINE;
if (mViews.size() == 1) {
mCachedEnd = INVALID_LINE;
}
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize += helper.getDecoratedMeasurement(view);
}
}
示例2: appendToSpan
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void appendToSpan(View view, OrientationHelper helper) {
LayoutParams lp = getLayoutParams(view);
mViews.add(view);
mCachedEnd = INVALID_LINE;
if (mViews.size() == 1) {
mCachedStart = INVALID_LINE;
}
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize += helper.getDecoratedMeasurement(view);
}
}
示例3: popEnd
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void popEnd(OrientationHelper helper) {
final int size = mViews.size();
View end = mViews.remove(size - 1);
final LayoutParams lp = getLayoutParams(end);
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize -= helper.getDecoratedMeasurement(end);
}
if (size == 1) {
mCachedStart = INVALID_LINE;
}
mCachedEnd = INVALID_LINE;
}
示例4: popStart
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void popStart(OrientationHelper helper) {
View start = mViews.remove(0);
final LayoutParams lp = getLayoutParams(start);
if (mViews.size() == 0) {
mCachedEnd = INVALID_LINE;
}
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize -= helper.getDecoratedMeasurement(start);
}
mCachedStart = INVALID_LINE;
}
示例5: prependToSpan
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void prependToSpan(View view, OrientationHelperEx helper) {
LayoutParams lp = getLayoutParams(view);
mViews.add(0, view);
mCachedStart = INVALID_LINE;
if (mViews.size() == 1) {
mCachedEnd = INVALID_LINE;
}
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize += helper.getDecoratedMeasurement(view);
}
}
示例6: appendToSpan
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void appendToSpan(View view, OrientationHelperEx helper) {
LayoutParams lp = getLayoutParams(view);
mViews.add(view);
mCachedEnd = INVALID_LINE;
if (mViews.size() == 1) {
mCachedStart = INVALID_LINE;
}
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize += helper.getDecoratedMeasurement(view);
}
}
示例7: popEnd
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void popEnd(OrientationHelperEx helper) {
final int size = mViews.size();
View end = mViews.remove(size - 1);
final LayoutParams lp = getLayoutParams(end);
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize -= helper.getDecoratedMeasurement(end);
}
if (size == 1) {
mCachedStart = INVALID_LINE;
}
mCachedEnd = INVALID_LINE;
}
示例8: popStart
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void popStart(OrientationHelperEx helper) {
View start = mViews.remove(0);
final LayoutParams lp = getLayoutParams(start);
if (mViews.size() == 0) {
mCachedEnd = INVALID_LINE;
}
if (lp.isItemRemoved() || lp.isItemChanged()) {
mDeletedSize -= helper.getDecoratedMeasurement(start);
}
mCachedStart = INVALID_LINE;
}
示例9: layoutChunk
import android.support.v7.widget.RecyclerView.LayoutParams; //导入方法依赖的package包/类
void layoutChunk(Recycler recycler, State state, LayoutState layoutState, LayoutChunkResult result) {
View view = layoutState.next(recycler);
if (view == null) {
result.mFinished = true;
return;
}
int right;
int left;
int bottom;
int top;
LayoutParams params = (LayoutParams) view.getLayoutParams();
if (layoutState.mScrapList == null) {
if (this.mShouldReverseLayout == (layoutState.mLayoutDirection == -1)) {
addView(view);
} else {
addView(view, 0);
}
} else {
if (this.mShouldReverseLayout == (layoutState.mLayoutDirection == -1)) {
addDisappearingView(view);
} else {
addDisappearingView(view, 0);
}
}
measureChildWithMargins(view, 0, 0);
result.mConsumed = this.mOrientationHelper.getDecoratedMeasurement(view);
if (this.mOrientation == 1) {
if (isLayoutRTL()) {
right = getWidth() - getPaddingRight();
left = right - this.mOrientationHelper.getDecoratedMeasurementInOther(view);
} else {
left = getPaddingLeft();
right = left + this.mOrientationHelper.getDecoratedMeasurementInOther(view);
}
if (layoutState.mLayoutDirection == -1) {
bottom = layoutState.mOffset;
top = layoutState.mOffset - result.mConsumed;
} else {
top = layoutState.mOffset;
bottom = layoutState.mOffset + result.mConsumed;
}
} else {
top = getPaddingTop();
bottom = top + this.mOrientationHelper.getDecoratedMeasurementInOther(view);
if (layoutState.mLayoutDirection == -1) {
right = layoutState.mOffset;
left = layoutState.mOffset - result.mConsumed;
} else {
left = layoutState.mOffset;
right = layoutState.mOffset + result.mConsumed;
}
}
layoutDecorated(view, left + params.leftMargin, top + params.topMargin, right - params.rightMargin, bottom - params.bottomMargin);
if (params.isItemRemoved() || params.isItemChanged()) {
result.mIgnoreConsumed = true;
}
result.mFocusable = view.isFocusable();
}