mmoamenn / LuckyWheel_Android

A custom component that displays a lucky wheel. it ⁠ features easy customize of colors, addition of items and it's very trivial to integrate in your application.
MIT License
127 stars 55 forks source link

Features added #2

Closed MFlisar closed 5 years ago

MFlisar commented 6 years ago

I added support for texts (with custom color and text size) and custom rotation time and custom rotation interpolator

I changed the WheelItem a little bit for this...

Pull request also solves this issue: https://github.com/mmoamenn/LuckyWheel_Android/issues/1

MFlisar commented 6 years ago

added a function to set initial rotation to a segments center, currently it's starting at a unknown point, that's depending on the number of items. With this function you can instantly set the rotation to a clear target segment.

PS: I realised that all the rotate to functions works with numbers from 1 to n (default is to use indices from 0 to n -1). Not intuitive for me... Should probably at least be documented...

I personally would suggest to change this to use indices from 0 to n -1. Let me know what you think of this.

MFlisar commented 6 years ago

force_square attribute added. This way, you can add the view to your layout like following.

        android:layout_width="match_parent"
        android:layout_height="match_parent"

And still get a square layout, centered in this view

mmoamenn commented 5 years ago

I do it by much better way kindly check the last version of code and Thank you