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

Set the default value for align items as stretch (#189)

上级 53e5087e
......@@ -1709,6 +1709,7 @@ public class FlexboxLayoutManagerTest {
activity.setContentView(R.layout.recyclerview);
RecyclerView recyclerView = (RecyclerView) activity.findViewById(R.id.recyclerview);
layoutManager.setFlexDirection(FlexDirection.ROW);
layoutManager.setAlignItems(AlignItems.FLEX_START);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(adapter);
for (int i = 0; i < 50; i++) {
......@@ -1767,6 +1768,7 @@ public class FlexboxLayoutManagerTest {
activity.setContentView(R.layout.recyclerview);
RecyclerView recyclerView = (RecyclerView) activity.findViewById(R.id.recyclerview);
layoutManager.setFlexDirection(FlexDirection.COLUMN);
layoutManager.setAlignItems(AlignItems.FLEX_START);
recyclerView.setLayoutManager(layoutManager);
recyclerView.setAdapter(adapter);
for (int i = 0; i < 50; i++) {
......
......@@ -168,6 +168,7 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
@FlexWrap int flexWrap) {
setFlexDirection(flexDirection);
setFlexWrap(flexWrap);
setAlignItems(AlignItems.STRETCH);
setAutoMeasureEnabled(true);
}
......@@ -204,8 +205,8 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
}
break;
}
setFlexWrap(FlexWrap.WRAP);
setAlignItems(AlignItems.STRETCH);
setAutoMeasureEnabled(true);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册