Android wheel selector JFPicker, recommend an open source library of your own

I made reference to the open source library AndroidPicker.
The AndroidPicker function is very complete, but many places do not meet my daily development requirements, so I made significant modifications based on the code of AndroidPicker. Thank you for the open source.

use

	allprojects {
    
    
		repositories {
    
    
			...
			maven {
    
     url 'https://jitpack.io' }
		}
	}
	implementation 'com.github.JFShare:JFPicker:2.0'

1. Replacement of the core scroll wheel control

Use RecyclerView + RecyclerView.ItemDecoration to replace the core wheel control of AndroidPicker, providing a better wheel 3D effect and scrolling experience.
The core WheelView wheel control, the style is drawn by WheelDecoration, the data is controlled by WheelViewAdapter , the code is shared by colleagues, it should be shared by online experts, if you know the source, please leave a message.
After refactoring, more settings are supported.
Properties can be set dynamically and take effect immediately:
1. Scroll wheel effect settings: wheel style or RecyclerView tile style, whether to use canvas offset to achieve a more three-dimensional 3D effect, the curvature of the wheel, several items above and below the selected item, and each item Height
2. Font settings: font color, selected font color, font size, selected font size, whether to bold, selected whether to bold 3.
Interval settings: interval style, interval between cut lines, cut background color, interval line Color, spacer line width, spacer rounded corner
4. Custom formatting style: use custom transparency gradient, use custom text size gradient, use custom text formatting

2. Some scroll wheel pop-ups were redone based on AndroidPicker.

  1. Select YearMonthDayPicker for the year, month and day, select HourMinuteSecondPicker for the hour, minute and second, and select DateTimePicker for the year, month, day, hour, minute and second.
    year month day selector
    hour minute second selector
    Year, month, day, hour, minute and second selector
  2. Select BirthdayPicker for year, month, day with text, select BirthdayWithTimePicker for year, month, day, hour, minute and second with text.
    year month day selector
    Year, month, day, hour, minute and second selector
  3. Calendar selection made using CalendarView calendar component, beautiful style. CalendarPicker provides single selection, multiple selection, and range selection.
    Calendar picker
    4. Single-item wheel selection OptionPicker, three-level linkage selection LinkagePicker, and list-style single-item selection OptionRecyclerViewPicker
    radio selector
    Secondary and third-level linkage selector
    List style selector
  4. Single-select RadioPicker, multi-select CheckBoxPicker, prompt pop-up window TipsPicker, input pop-up window InputPicker
    radio selector
    multi-select selector
    Prompt pop-up window
    Input pop-up window
    6. Address selection AddressPicker, ViewPager style address selection AddressViewPagerPicker, ViewPager style five-level selection
    NetRequestPicker
    address selector
    ViewPager style address selector

Five level request selector

Guess you like

Origin blog.csdn.net/weixin_43864176/article/details/125265855