Repository navigation
Changed
- The library is now written in Kotlin (2.2.10). Scrolling, alignment and linkage behavior is unchanged.
- New dependency: the library now brings in
org.jetbrains.kotlin:kotlin-stdlib:2.2.10. Java-only projects need no other changes; Kotlin projects need Kotlin 2.1 or later.
Java compatibility
The Java API is source and binary compatible with 2.x: same classes, methods, static constants and fields, and null arguments still throw WheelViewException.
- Builder methods now return parameterized types (
WheelViewDialog<T>,BaseWheelAdapter<T>), andsetOnDialogItemClickListenertakesOnDialogItemClickListener<? super T>. Code that uses raw types compiles unchanged.
Kotlin callers
Kotlin now sees the library's real nullability instead of platform types. Three spots may need a small edit:
WheelData.nameisString?.- When overriding
BaseWheelAdapter.bindView, declareconvertView: View?andparent: ViewGroup. wheel.selectionproperty syntax is no longer available; callgetSelection()/setSelection().
Listeners are fun interfaces, so lambdas work as before. wheel.style, wheel.skin, currentPosition, selectionItem and wheelCount keep their property syntax.
Sample app
- README no longer links to the APK; download it from the assets below.
Installation
implementation 'com.github.venshine:WheelView:3.0.0'implementation("com.github.venshine:WheelView:3.0.0")