提交 eca9d4d1 编写于 作者: T Takeshi Hagikura 提交者: GitHub

Remove the deprecated methods (#343)

上级 717a7b45
......@@ -24,7 +24,6 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.annotation.VisibleForTesting;
import android.support.v4.view.MarginLayoutParamsCompat;
import android.support.v4.view.ViewCompat;
import android.util.SparseIntArray;
import android.view.View;
import android.view.ViewGroup;
......@@ -492,8 +491,8 @@ class FlexboxHelper {
// less than the min width after the first measurement.
checkSizeConstraints(child, i);
childState = ViewCompat.combineMeasuredStates(
childState, ViewCompat.getMeasuredState(child));
childState = View.combineMeasuredStates(
childState, child.getMeasuredState());
if (isWrapRequired(child, mainMode, mainSize, flexLine.mMainSize,
getViewMeasuredSizeMain(child, isMainHorizontal)
......
......@@ -451,25 +451,25 @@ public class FlexboxLayout extends ViewGroup implements FlexContainer {
switch (widthMode) {
case MeasureSpec.EXACTLY:
if (widthSize < calculatedMaxWidth) {
childState = ViewCompat
.combineMeasuredStates(childState, ViewCompat.MEASURED_STATE_TOO_SMALL);
childState = View
.combineMeasuredStates(childState, View.MEASURED_STATE_TOO_SMALL);
}
widthSizeAndState = ViewCompat.resolveSizeAndState(widthSize, widthMeasureSpec,
widthSizeAndState = View.resolveSizeAndState(widthSize, widthMeasureSpec,
childState);
break;
case MeasureSpec.AT_MOST: {
if (widthSize < calculatedMaxWidth) {
childState = ViewCompat
.combineMeasuredStates(childState, ViewCompat.MEASURED_STATE_TOO_SMALL);
childState = View
.combineMeasuredStates(childState, View.MEASURED_STATE_TOO_SMALL);
} else {
widthSize = calculatedMaxWidth;
}
widthSizeAndState = ViewCompat.resolveSizeAndState(widthSize, widthMeasureSpec,
widthSizeAndState = View.resolveSizeAndState(widthSize, widthMeasureSpec,
childState);
break;
}
case MeasureSpec.UNSPECIFIED: {
widthSizeAndState = ViewCompat
widthSizeAndState = View
.resolveSizeAndState(calculatedMaxWidth, widthMeasureSpec, childState);
break;
}
......@@ -480,27 +480,27 @@ public class FlexboxLayout extends ViewGroup implements FlexContainer {
switch (heightMode) {
case MeasureSpec.EXACTLY:
if (heightSize < calculatedMaxHeight) {
childState = ViewCompat.combineMeasuredStates(childState,
ViewCompat.MEASURED_STATE_TOO_SMALL
>> ViewCompat.MEASURED_HEIGHT_STATE_SHIFT);
childState = View.combineMeasuredStates(childState,
View.MEASURED_STATE_TOO_SMALL
>> View.MEASURED_HEIGHT_STATE_SHIFT);
}
heightSizeAndState = ViewCompat.resolveSizeAndState(heightSize, heightMeasureSpec,
heightSizeAndState = View.resolveSizeAndState(heightSize, heightMeasureSpec,
childState);
break;
case MeasureSpec.AT_MOST: {
if (heightSize < calculatedMaxHeight) {
childState = ViewCompat.combineMeasuredStates(childState,
ViewCompat.MEASURED_STATE_TOO_SMALL
>> ViewCompat.MEASURED_HEIGHT_STATE_SHIFT);
childState = View.combineMeasuredStates(childState,
View.MEASURED_STATE_TOO_SMALL
>> View.MEASURED_HEIGHT_STATE_SHIFT);
} else {
heightSize = calculatedMaxHeight;
}
heightSizeAndState = ViewCompat.resolveSizeAndState(heightSize, heightMeasureSpec,
heightSizeAndState = View.resolveSizeAndState(heightSize, heightMeasureSpec,
childState);
break;
}
case MeasureSpec.UNSPECIFIED: {
heightSizeAndState = ViewCompat.resolveSizeAndState(calculatedMaxHeight,
heightSizeAndState = View.resolveSizeAndState(calculatedMaxHeight,
heightMeasureSpec, childState);
break;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册