timepicker selected value text size [duplicate]

2019-08-30 12:30发布

This question already has an answer here:

I want to change the selected text value size of a time picker.

Do we have any libraries for the same?

As I searched we do not have any customization in android. Need to develop a UI similar to iOS time picker.

1条回答
beautiful°
2楼-- · 2019-08-30 13:13

For android brucetoo/PickView similar to IOS,

This is a helper lib for us to pick date or province like IOS system WheelView widget.

Added feature to pick time with WheelView Widget

Dependencies

   compile 'com.brucetoo.pickview:library:1.2.3'

to use

 DatePickerPopWin pickerPopWin = new DatePickerPopWin.Builder(MainActivity.this, new DatePickerPopWin.OnDatePickedListener() {
                       @Override
                       public void onDatePickCompleted(int year, int month, int day, String dateDesc) {
                           Toast.makeText(MainActivity.this, dateDesc, Toast.LENGTH_SHORT).show();
                       }
                    }).textConfirm("CONFIRM") //text of confirm button
                           .textCancel("CANCEL") //text of cancel button
                           .btnTextSize(16) // button text size
                           .viewTextSize(25) // pick view text size
                           .colorCancel(Color.parseColor("#999999")) //color of cancel button
                           .colorConfirm(Color.parseColor("#009900"))//color of confirm button
                           .minYear(1990) //min year in loop
                           .maxYear(2550) // max year in loop
                           .showDayMonthYear(true) // shows like dd mm yyyy (default is false) 
                           .dateChose("2013-11-11") // date chose when init popwindow
                           .build();

enter image description here

查看更多
登录 后发表回答