Skip to content

Commit e4e2997

Browse files
author
hongyangAndroid
committed
update fix buf
1 parent 2de8c46 commit e4e2997

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

generate_values/autolayout.jar

156 Bytes
Binary file not shown.

generate_values/src/GenerateValueFiles.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public class GenerateValueFiles {
2828
public GenerateValueFiles(int baseX, int baseY, String supportStr) {
2929
this.baseW = baseX;
3030
this.baseH = baseY;
31+
32+
if (!this.supportStr.contains(baseX + "," + baseY)) {
33+
this.supportStr += baseX + "," + baseY + ";";
34+
}
35+
3136
this.supportStr += validateInput(supportStr);
3237

3338
System.out.println(supportStr);
@@ -54,13 +59,13 @@ private String validateInput(String supportStr) {
5459
String[] wh;
5560
for (String val : vals) {
5661
try {
57-
if (val == null || val.length() == 0)
62+
if (val == null || val.trim().length() == 0)
5863
continue;
5964

6065
wh = val.split(",");
6166
w = Integer.parseInt(wh[0]);
6267
h = Integer.parseInt(wh[1]);
63-
} catch (NumberFormatException e) {
68+
} catch (Exception e) {
6469
System.out.println("skip invalidate params : w,h = " + val);
6570
continue;
6671
}

0 commit comments

Comments
 (0)