florent37 / SingleDateAndTimePicker

You can now select a date and a time with only one widget !
Apache License 2.0
1.02k stars 333 forks source link

Set wheel-angle via XML + fixed wrap-content by adding item-spacing #268

Closed arberg closed 4 years ago

arberg commented 4 years ago

Added two features

Set size of visible circle to quarter circle by:

Set item-spacing, allowing the use of wrap-content, via

Extended demo-app example in demo-activity so there is now two wheels with different settings.

PS: Florent, I do apologize for forgot to mention something in my last change request that you merged and released into 2.2.1. If 'mustBeFuture' is true I no longer show past dates, by changing generator in WheelDayPicker. I didn't make it into a xml-property whether to show past dates, because i think this is always a better behaviour. But if you ran the demo-app, you would have noticed, so I guess you were okay with it.

I also think I'm done now, ie. no more changes. I couldn't figure out the Math last week and the draw-code for changing angles, but now I managed to nail it.

PPS: There's a bug in the code, that is unrelated to this change, in that sometimes on some specific sizes, the top and bottom item in the wheel are drawn with full opacity. The wheel-sizes in the demo, doesn't provoke this bug, and I couldn't find the source of the bug. Hence its still there

florent37 commented 4 years ago

i merge it and push a new version, thanks

arberg commented 4 years ago

Your welcome, and thank you for the quick merge.

Best Alex

On Sun, Apr 5, 2020 at 6:34 PM Florent CHAMPIGNY notifications@github.com wrote:

i merge it and push a new version, thanks

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/florent37/SingleDateAndTimePicker/pull/268#issuecomment-609444293, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQSC2CLWXZYDKDKQISG7GLRLCXHXANCNFSM4MA6R4CQ .

-- Alex Rune Berg Humlehaven 120 8382 Hinnerup +45 28 71 88 52