提交 780427bb 编写于 作者: T Takeshi Hagikura

Fix format (#258)

上级 5b2fff67
......@@ -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 programmatically.
for (int i = 0; i < textViews.length; i++) {
final int index = i;
textViews[index].setOnEditorActionListener(new TextView.OnEditorActionListener() {
......
......@@ -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}.
......
......@@ -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();
......
......@@ -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;
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册