I'm looking for something like TimeRange. In fact ...
# android
t
I'm looking for something like TimeRange. In fact I thought TimeRange was just the thing I needed: A Range/Interval object that models the span between a start Instant and an end Instant. Then, I discovered that it's part of the android-wearable stuff? And not part of the core stuff or even stock android stuff? Is there an alternative that can be used on a normal Android phone project?
e
why not
ClosedRange<Instant>
using built-in types?
(or
OpenEndRange<Instant>
if that's what you want)
t
That's excellent. Wouldn't have thought to. Not sure I knew you could use those without discrete steps. But since I apparently can... why then is there a TimeRange in the wearable stuff? Why don't they just used XRange<Instant> ?
e
ComplicationData predates androidx-wear migrating to Kotlin, and it's probably still nice for Java consumers