Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
门心叼龙
flexbox-layout
提交
780427bb
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 搜索 >>
提交
780427bb
编写于
4月 13, 2017
作者:
T
Takeshi Hagikura
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix format (#258)
上级
5b2fff67
变更
10
显示空白变更内容
内联
并排
Showing
10 changed file
with
56 addition
and
49 deletion
+56
-49
demo-playground/src/main/java/com/google/android/flexbox/FlexItemEditFragment.java
...java/com/google/android/flexbox/FlexItemEditFragment.java
+9
-9
flexbox/src/androidTest/java/com/google/android/flexbox/FlexboxHelperTest.java
...st/java/com/google/android/flexbox/FlexboxHelperTest.java
+12
-10
flexbox/src/androidTest/java/com/google/android/flexbox/test/FlexboxAndroidTest.java
...a/com/google/android/flexbox/test/FlexboxAndroidTest.java
+1
-1
flexbox/src/androidTest/java/com/google/android/flexbox/test/FlexboxLayoutManagerConfigChangeTest.java
...id/flexbox/test/FlexboxLayoutManagerConfigChangeTest.java
+4
-2
flexbox/src/main/java/com/google/android/flexbox/FlexItem.java
...ox/src/main/java/com/google/android/flexbox/FlexItem.java
+2
-2
flexbox/src/main/java/com/google/android/flexbox/FlexLine.java
...ox/src/main/java/com/google/android/flexbox/FlexLine.java
+4
-4
flexbox/src/main/java/com/google/android/flexbox/FlexboxHelper.java
...c/main/java/com/google/android/flexbox/FlexboxHelper.java
+3
-2
flexbox/src/main/java/com/google/android/flexbox/FlexboxItemDecoration.java
...ava/com/google/android/flexbox/FlexboxItemDecoration.java
+6
-6
flexbox/src/main/java/com/google/android/flexbox/FlexboxLayout.java
...c/main/java/com/google/android/flexbox/FlexboxLayout.java
+1
-1
flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java
...java/com/google/android/flexbox/FlexboxLayoutManager.java
+14
-12
未找到文件。
demo-playground/src/main/java/com/google/android/flexbox/FlexItemEditFragment.java
浏览文件 @
780427bb
...
...
@@ -16,14 +16,6 @@
package
com.google.android.flexbox
;
import
com.google.android.apps.flexbox.R
;
import
com.google.android.flexbox.validators.DimensionInputValidator
;
import
com.google.android.flexbox.validators.FixedDimensionInputValidator
;
import
com.google.android.flexbox.validators.FlexBasisPercentInputValidator
;
import
com.google.android.flexbox.validators.InputValidator
;
import
com.google.android.flexbox.validators.IntegerInputValidator
;
import
com.google.android.flexbox.validators.NonNegativeDecimalInputValidator
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.os.Build
;
...
...
@@ -50,6 +42,14 @@ import android.widget.Spinner;
import
android.widget.TextView
;
import
android.widget.Toast
;
import
com.google.android.apps.flexbox.R
;
import
com.google.android.flexbox.validators.DimensionInputValidator
;
import
com.google.android.flexbox.validators.FixedDimensionInputValidator
;
import
com.google.android.flexbox.validators.FlexBasisPercentInputValidator
;
import
com.google.android.flexbox.validators.InputValidator
;
import
com.google.android.flexbox.validators.IntegerInputValidator
;
import
com.google.android.flexbox.validators.NonNegativeDecimalInputValidator
;
/**
* DialogFragment that changes the properties for a flex item.
*/
...
...
@@ -318,7 +318,7 @@ public class FlexItemEditFragment extends DialogFragment {
// https://developer.android.com/training/keyboard-input/navigation.html
// But it requires API level 11 as a minimum sdk version. To support the lower level
// devices,
// doing it programatically.
// doing it program
m
atically.
for
(
int
i
=
0
;
i
<
textViews
.
length
;
i
++)
{
final
int
index
=
i
;
textViews
[
index
].
setOnEditorActionListener
(
new
TextView
.
OnEditorActionListener
()
{
...
...
flexbox/src/androidTest/java/com/google/android/flexbox/FlexboxHelperTest.java
浏览文件 @
780427bb
...
...
@@ -16,23 +16,25 @@
package
com.google.android.flexbox
;
import
com.google.android.flexbox.test.FlexboxTestActivity
;
import
static
com
.
google
.
android
.
flexbox
.
test
.
IsEqualAllowingError
.
isEqualAllowingError
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
static
junit
.
framework
.
Assert
.
assertEquals
;
import
static
junit
.
framework
.
Assert
.
assertNotNull
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
android.app.Activity
;
import
android.support.test.rule.ActivityTestRule
;
import
android.support.test.runner.AndroidJUnit4
;
import
android.view.View
;
import
static
com
.
google
.
android
.
flexbox
.
test
.
IsEqualAllowingError
.
isEqualAllowingError
;
import
static
junit
.
framework
.
Assert
.
assertEquals
;
import
static
junit
.
framework
.
Assert
.
assertNotNull
;
import
static
org
.
hamcrest
.
Matchers
.
is
;
import
static
org
.
junit
.
Assert
.
assertThat
;
import
com.google.android.flexbox.test.FlexboxTestActivity
;
import
org.junit.Before
;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
/**
* Unit tests for {@link FlexboxHelper}.
...
...
flexbox/src/androidTest/java/com/google/android/flexbox/test/FlexboxAndroidTest.java
浏览文件 @
780427bb
flexbox/src/androidTest/java/com/google/android/flexbox/test/FlexboxLayoutManagerConfigChangeTest.java
浏览文件 @
780427bb
...
...
@@ -63,7 +63,8 @@ public class FlexboxLayoutManagerConfigChangeTest {
@Test
@FlakyTest
public
void
testFlexLinesDiscardedOnOrientationChange_direction_row
()
throws
Throwable
{
// Verifies the case that the calculated Flex lines are correctly discarded when a orientation
// Verifies the case that the calculated Flex lines are correctly discarded when a
// orientation
// happens with an Activity that handles configuration changes manually
final
ConfigChangeActivity
activity
=
mActivityRule
.
getActivity
();
final
FlexboxLayoutManager
layoutManager
=
new
FlexboxLayoutManager
();
...
...
@@ -122,7 +123,8 @@ public class FlexboxLayoutManagerConfigChangeTest {
@Test
@FlakyTest
public
void
testFlexLinesDiscardedOnOrientationChange_direction_column
()
throws
Throwable
{
// Verifies the case that the calculated Flex lines are correctly discarded when a orientation
// Verifies the case that the calculated Flex lines are correctly discarded when a
// orientation
// happens with an Activity that handles configuration changes manually
final
ConfigChangeActivity
activity
=
mActivityRule
.
getActivity
();
final
FlexboxLayoutManager
layoutManager
=
new
FlexboxLayoutManager
();
...
...
flexbox/src/main/java/com/google/android/flexbox/FlexItem.java
浏览文件 @
780427bb
flexbox/src/main/java/com/google/android/flexbox/FlexLine.java
浏览文件 @
780427bb
flexbox/src/main/java/com/google/android/flexbox/FlexboxHelper.java
浏览文件 @
780427bb
...
...
@@ -17,6 +17,7 @@
package
com.google.android.flexbox
;
import
static
android
.
support
.
v7
.
widget
.
RecyclerView
.
NO_POSITION
;
import
static
com
.
google
.
android
.
flexbox
.
FlexItem
.
FLEX_BASIS_PERCENT_DEFAULT
;
import
android.support.annotation.NonNull
;
...
...
flexbox/src/main/java/com/google/android/flexbox/FlexboxItemDecoration.java
浏览文件 @
780427bb
flexbox/src/main/java/com/google/android/flexbox/FlexboxLayout.java
浏览文件 @
780427bb
flexbox/src/main/java/com/google/android/flexbox/FlexboxLayoutManager.java
浏览文件 @
780427bb
...
...
@@ -1447,7 +1447,8 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
* @param anchorInfo the anchor information where layout should start
* @param fromNextLine if set to {@code true}, layout starts from the next flex line set to
* the anchor information
* @param considerInfinite if set to {@code true}, the judgement if the infinite available space
* @param considerInfinite if set to {@code true}, the judgement if the infinite available
* space
* needs to be considered.
*/
private
void
updateLayoutStateToFillEnd
(
AnchorInfo
anchorInfo
,
boolean
fromNextLine
,
...
...
@@ -1483,7 +1484,8 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
* @param anchorInfo the anchor information where layout should start
* @param fromPreviousLine if set to {@code true}, layout starts from the next flex line set to
* the anchor information
* @param considerInfinite if set to {@code true}, the judgement if the infinite available space
* @param considerInfinite if set to {@code true}, the judgement if the infinite available
* space
* needs to be considered.
*/
private
void
updateLayoutStateToFillStart
(
AnchorInfo
anchorInfo
,
boolean
fromPreviousLine
,
...
...
@@ -1948,7 +1950,7 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
/**
* Returns the adapter position of the first fully visible view. This position does not include
* adapter changes that were dispatched after the last layout pass.
*
* @return The adapter position of the first fully visible item or
* {@link RecyclerView#NO_POSITION} if there aren't any visible items.
* @see #findFirstVisibleItemPosition()
...
...
@@ -1963,7 +1965,7 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
/**
* Returns the adapter position of the last visible view. This position does not include
* adapter changes that were dispatched after the last layout pass.
*
* If RecyclerView has item decorators, they will be considered in calculations as well.
* LayoutManager may pre-cache some views that are not necessarily visible. Those views
* are ignored in this method.
...
...
@@ -1982,7 +1984,7 @@ public class FlexboxLayoutManager extends RecyclerView.LayoutManager implements
/**
* Returns the adapter position of the last fully visible view. This position does not include
* adapter changes that were dispatched after the last layout pass.
*
* @return The adapter position of the last fully visible view or
* {@link RecyclerView#NO_POSITION} if there aren't any visible items.
* @see #findLastVisibleItemPosition()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录