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

Remove the deprecated methods (#343)

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