File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed
app/src/main/java/com/bigkoo/pickerviewdemo
pickerview/src/main/java/com/bigkoo/pickerview/view Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -358,8 +358,7 @@ public void onClick(View v) {
358
358
359
359
}
360
360
})
361
- .setLineSpacingMultiplier (1.2f )
362
- .setContentTextSize (40 )
361
+ .setContentTextSize (20 )
363
362
.setDividerColor (Color .BLACK )
364
363
.build ();
365
364
pvCustomOptions .setPicker (cardItem );//添加数据
Original file line number Diff line number Diff line change @@ -211,13 +211,21 @@ public BasePickerView setOnDismissListener(OnDismissListener onDismissListener)
211
211
}
212
212
213
213
public BasePickerView setKeyBackCancelable (boolean isCancelable ) {
214
- rootView .setFocusable (isCancelable );
215
- rootView .setFocusableInTouchMode (isCancelable );
214
+
215
+ ViewGroup View ;
216
+ if (isDialog ()){
217
+ View = dialogView ;
218
+ }else {
219
+ View = rootView ;
220
+ }
221
+
222
+ View .setFocusable (isCancelable );
223
+ View .setFocusableInTouchMode (isCancelable );
216
224
if (isCancelable ) {
217
- rootView .setOnKeyListener (onKeyBackListener );
225
+ View .setOnKeyListener (onKeyBackListener );
218
226
}
219
227
else {
220
- rootView .setOnKeyListener (null );
228
+ View .setOnKeyListener (null );
221
229
}
222
230
return this ;
223
231
}
You can’t perform that action at this time.
0 commit comments