Skip to content

Commit fbc83dc

Browse files
Merge branch 'antondudakov-master'
1 parent 774854d commit fbc83dc

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

app/src/main/java/com/xiaofeng/androidlibs/DemoUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class DemoUtil {
1515
public static List<String> generate(int total, int minLen, int maxLen, int maxLinesPerItem, boolean randomOrder) {
1616
ArrayList<String> result = new ArrayList<>(total);
1717
StringBuilder sb = new StringBuilder();
18-
for (int i = 1; i <= total; i ++) {
18+
for (int i = 1; i <= total; i++) {
1919
int lineCount = random.nextInt(maxLinesPerItem) + 1;
2020
List<String> lines = generate(lineCount, minLen, maxLen, randomOrder);
2121
boolean firstLine = true;
@@ -27,7 +27,7 @@ public static List<String> generate(int total, int minLen, int maxLen, int maxLi
2727
}
2828
sb.append(line);
2929
}
30-
result.add(sb.toString() + " (" + i + ")");
30+
result.add(sb.toString() + " (" + i + ")");
3131
}
3232
return result;
3333
}

app/src/main/java/com/xiaofeng/androidlibs/MainActivity.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,23 @@
1919

2020
public class MainActivity extends AppCompatActivity {
2121

22-
private static final int REQ_CODE_SETTINGS = 101;
23-
RecyclerView recyclerView;
22+
private static final int REQ_CODE_SETTINGS = 101;
23+
RecyclerView recyclerView;
2424
FlowLayoutManager flowLayoutManager;
2525
MarkdownView markdownView;
2626
private boolean settingChanged = false;
2727
@Override
2828
protected void onCreate(Bundle savedInstanceState) {
2929
super.onCreate(savedInstanceState);
3030
setContentView(R.layout.app_bar_main);
31-
Toolbar toolbar = findViewById(R.id.toolbar);
32-
setSupportActionBar(toolbar);
31+
Toolbar toolbar = findViewById(R.id.toolbar);
32+
setSupportActionBar(toolbar);
3333
init();
3434
}
3535

3636
private void init() {
37-
recyclerView = findViewById(R.id.list);
38-
flowLayoutManager = new FlowLayoutManager().singleItemPerLine();
37+
recyclerView = findViewById(R.id.list);
38+
flowLayoutManager = new FlowLayoutManager().singleItemPerLine();
3939
flowLayoutManager.setAutoMeasureEnabled(true);
4040
recyclerView.setLayoutManager(flowLayoutManager);
4141
recyclerView.setAdapter(new DemoAdapter(1, DemoUtil.generate(32, 10, 60, 1, false)));

flowlayoutmanager/src/main/java/com/xiaofeng/flowlayoutmanager/LayoutHelper.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public static boolean shouldStartNewline(int x, int childWidth, int leftEdge, in
3030
case CENTER:
3131
default:
3232
return x + childWidth > rightEdge;
33-
}
34-
}
33+
}
34+
}
3535

3636
public int leftVisibleEdge() {
3737
return recyclerView.getPaddingLeft();
@@ -61,6 +61,6 @@ public Point layoutStartPoint(LayoutContext layoutContext) {
6161
case CENTER:
6262
default:
6363
return new Point(leftVisibleEdge(), topVisibleEdge());
64-
}
65-
}
64+
}
65+
}
6666
}

0 commit comments

Comments
 (0)