Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to round the beginning and end of a selected range? #419

Closed
jglanfield opened this issue Dec 8, 2017 · 5 comments
Closed

How to round the beginning and end of a selected range? #419

jglanfield opened this issue Dec 8, 2017 · 5 comments

Comments

@jglanfield
Copy link

I've seen examples of where this has been done, but not sure if I need to create a decorator or something. Basically, I want the beginning and end dates of a selected range to have their selections rounded, like here:

#377

@edenman
Copy link
Collaborator

edenman commented Dec 8, 2017

I think you can do this just by using tsquare_state_range_last et al. If that ends up being infeasible, you can implement a CalendarCellDecorator or if you need even more control, DayViewAdapter.

@edenman edenman closed this as completed Dec 8, 2017
@jglanfield
Copy link
Author

jglanfield commented Dec 8, 2017

But isn't tsquare_state_range_last a boolean?

@edenman
Copy link
Collaborator

edenman commented Dec 8, 2017

Yup, but it's an attribute to be used in a selector:
https://github.com/square/android-times-square/blob/master/sample/src/main/res/drawable/custom_calendar_bg_selector.xml

So you'd basically have your rounded corner background drawable, and use it when tsquare_state_range_last etc are true

@jglanfield
Copy link
Author

jglanfield commented Dec 11, 2017

Thanks :)

That seems to "work," but do you know how to get that property to not clash with the "state_selected" property?

@jglanfield
Copy link
Author

Never mind. Ordering matters. All good. Appreciate your help with this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants