Skip to content

Commit a800e1c

Browse files
author
Mohammed Ezzat
committed
Multiple quality improvements
1 parent 669a768 commit a800e1c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

library/src/main/java/cn/jeesoft/widget/pickerview/LoopView.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,6 @@ protected void onDraw(Canvas canvas) {
270270
}
271271
k1++;
272272
}
273-
k1 = (v - g) / 2;
274273
canvas.drawLine(0.0F, n, v, n, paintC);
275274
canvas.drawLine(0.0F, o, v, o, paintC);
276275
int j1 = 0;
@@ -287,7 +286,7 @@ protected void onDraw(Canvas canvas) {
287286

288287
String str = as[j1];
289288

290-
int zoomTextSize = textSize;
289+
int zoomTextSize;
291290
double zoom = ((double) textSize - str.length()*2) / textSize * 1.2;
292291
zoomTextSize = (int) (textSize * zoom);
293292
if (zoomTextSize < 10) {

library/src/main/java/cn/jeesoft/widget/pickerview/MWheelOptions.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ public void setPicker(List<String> options1Items,
4545
public void setPicker(List<String> options1Items,
4646
List<List<String>> options2Items,
4747
List<List<List<String>>> options3Items) {
48-
this.mOptions1Items = (options1Items == null ? new ArrayList<String>() : options1Items);
49-
this.mOptions2Items = (options2Items == null ? new ArrayList<List<String>>() : options2Items);
50-
this.mOptions3Items = (options3Items == null ? new ArrayList<List<List<String>>>() : options3Items);
48+
this.mOptions1Items = options1Items == null ? new ArrayList<String>() : options1Items;
49+
this.mOptions2Items = options2Items == null ? new ArrayList<List<String>>() : options2Items;
50+
this.mOptions3Items = options3Items == null ? new ArrayList<List<List<String>>>() : options3Items;
5151
// 选项1
5252
wv_option1 = (LoopView) view.findViewById(R.id.j_options1);
5353
wv_option1.setArrayList(mOptions1Items);// 设置显示数据

0 commit comments

Comments
 (0)