Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
门心叼龙
flexbox-layout
提交
eca9d4d1
F
flexbox-layout
项目概览
门心叼龙
/
flexbox-layout
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
F
flexbox-layout
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
eca9d4d1
编写于
8月 08, 2017
作者:
T
Takeshi Hagikura
提交者:
GitHub
8月 08, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove the deprecated methods (#343)
上级
717a7b45
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
18 addition
and
19 deletion
+18
-19
flexbox/src/main/java/com/google/android/flexbox/FlexboxHelper.java
...c/main/java/com/google/android/flexbox/FlexboxHelper.java
+2
-3
flexbox/src/main/java/com/google/android/flexbox/FlexboxLayout.java
...c/main/java/com/google/android/flexbox/FlexboxLayout.java
+16
-16
未找到文件。
flexbox/src/main/java/com/google/android/flexbox/FlexboxHelper.java
浏览文件 @
eca9d4d1
...
...
@@ -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
=
View
Compat
.
combineMeasuredStates
(
childState
,
ViewCompat
.
getMeasuredState
(
child
));
childState
=
View
.
combineMeasuredStates
(
childState
,
child
.
getMeasuredState
(
));
if
(
isWrapRequired
(
child
,
mainMode
,
mainSize
,
flexLine
.
mMainSize
,
getViewMeasuredSizeMain
(
child
,
isMainHorizontal
)
...
...
flexbox/src/main/java/com/google/android/flexbox/FlexboxLayout.java
浏览文件 @
eca9d4d1
...
...
@@ -451,25 +451,25 @@ public class FlexboxLayout extends ViewGroup implements FlexContainer {
switch
(
widthMode
)
{
case
MeasureSpec
.
EXACTLY
:
if
(
widthSize
<
calculatedMaxWidth
)
{
childState
=
View
Compat
.
combineMeasuredStates
(
childState
,
View
Compat
.
MEASURED_STATE_TOO_SMALL
);
childState
=
View
.
combineMeasuredStates
(
childState
,
View
.
MEASURED_STATE_TOO_SMALL
);
}
widthSizeAndState
=
View
Compat
.
resolveSizeAndState
(
widthSize
,
widthMeasureSpec
,
widthSizeAndState
=
View
.
resolveSizeAndState
(
widthSize
,
widthMeasureSpec
,
childState
);
break
;
case
MeasureSpec
.
AT_MOST
:
{
if
(
widthSize
<
calculatedMaxWidth
)
{
childState
=
View
Compat
.
combineMeasuredStates
(
childState
,
View
Compat
.
MEASURED_STATE_TOO_SMALL
);
childState
=
View
.
combineMeasuredStates
(
childState
,
View
.
MEASURED_STATE_TOO_SMALL
);
}
else
{
widthSize
=
calculatedMaxWidth
;
}
widthSizeAndState
=
View
Compat
.
resolveSizeAndState
(
widthSize
,
widthMeasureSpec
,
widthSizeAndState
=
View
.
resolveSizeAndState
(
widthSize
,
widthMeasureSpec
,
childState
);
break
;
}
case
MeasureSpec
.
UNSPECIFIED
:
{
widthSizeAndState
=
View
Compat
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
=
View
Compat
.
combineMeasuredStates
(
childState
,
View
Compat
.
MEASURED_STATE_TOO_SMALL
>>
View
Compat
.
MEASURED_HEIGHT_STATE_SHIFT
);
childState
=
View
.
combineMeasuredStates
(
childState
,
View
.
MEASURED_STATE_TOO_SMALL
>>
View
.
MEASURED_HEIGHT_STATE_SHIFT
);
}
heightSizeAndState
=
View
Compat
.
resolveSizeAndState
(
heightSize
,
heightMeasureSpec
,
heightSizeAndState
=
View
.
resolveSizeAndState
(
heightSize
,
heightMeasureSpec
,
childState
);
break
;
case
MeasureSpec
.
AT_MOST
:
{
if
(
heightSize
<
calculatedMaxHeight
)
{
childState
=
View
Compat
.
combineMeasuredStates
(
childState
,
View
Compat
.
MEASURED_STATE_TOO_SMALL
>>
View
Compat
.
MEASURED_HEIGHT_STATE_SHIFT
);
childState
=
View
.
combineMeasuredStates
(
childState
,
View
.
MEASURED_STATE_TOO_SMALL
>>
View
.
MEASURED_HEIGHT_STATE_SHIFT
);
}
else
{
heightSize
=
calculatedMaxHeight
;
}
heightSizeAndState
=
View
Compat
.
resolveSizeAndState
(
heightSize
,
heightMeasureSpec
,
heightSizeAndState
=
View
.
resolveSizeAndState
(
heightSize
,
heightMeasureSpec
,
childState
);
break
;
}
case
MeasureSpec
.
UNSPECIFIED
:
{
heightSizeAndState
=
View
Compat
.
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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录