Skip to content

3.0.0

Latest

Choose a tag to compare

@venshine venshine released this 16 Nov 02:30
· 1 commit to master since this release

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>), and setOnDialogItemClickListener takes OnDialogItemClickListener<? 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.name is String?.
  • When overriding BaseWheelAdapter.bindView, declare convertView: View? and parent: ViewGroup.
  • wheel.selection property syntax is no longer available; call getSelection() / 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")