Comments (11)
@www0488 the layout resources are being set while you are initializing the "SingleRowCalendar" object. So, after every time you are changing month, you could simply call init() function. that worked for me. Thank you.
from singlerowcalendar.
You need to assign init() property where you are clicking on the button for next and previous months. Just add the init(); statement inside the button's onClickListener function for both previous and next month buttons.
from singlerowcalendar.
@www0488 Thanks for creating issue. Currently I don't have time to maintain this library....
from singlerowcalendar.
I have an UI Issue here which I don't know how to solve it.
The Calendar will display current selected date correct, the selected date will change it background. But when click the next/previous month and go back to the current month of year and try to select a date, the background wont change it color anymore.
I tested to debug & compare with the sample code from repo and I figured out object CalendarViewManager in my project does not triggered during the date selection after month has been changed. But when I tried the sample code from repo, the CalendarViewManager actually triggered and worked fine.
Same issue i have found
Please help to triggered out, what we can do for it.
from singlerowcalendar.
@miso01 can you help with this issue. The background of the selected date doesn't update after the month has been changed by any of the button. Tried to call init every time when month is changed....but its very slow and long press is called i don't know why. Please help
from singlerowcalendar.
As @Bhumil73 mentioned earlier , we need add Init() for both next and previous months action, and combining with the last chosen date likes this:
val myCalendarViewManager = object : CalendarViewManager { override fun setCalendarViewResourceId( position: Int, date: java.util.Date, isSelected: Boolean ): Int { return if (isSelected || chosenDate == date) R.layout.item_time_day_selected else R.layout.item_time_day }
from singlerowcalendar.
Problem found, The issue was caused by the version of constraintlayout in app Gradle build. If you have version which is higher than version 2.0.0-alpha3, your calendar selection will not working correctly when you change month. To walk around the issue, you have to decrease your constraintlayout version down to 2.0.0-alpha3 but the problem is still remains.
@miso01 Is there any chance you can fix it?
from singlerowcalendar.
Hello @RkPranto
I have tried your way but it's not working.
When we have to change the month using custom button than we had call init() funcation like this
singleRowCalendar.setDates(getDatesOfNextMonth())
singleRowCalendar.init()
But not working
Can you please help me
from singlerowcalendar.
@miso01 you need to check this issue. Your sample code works for the selection of date even after the next/previous month change. But when we add your Gradle dependency, it is not working. When we change the month, then the date selection not working. Not only me, but many other developers are having this issue.
from singlerowcalendar.
There's also a workaround to do this without the need to call the init()
block every time a new list of dates is set.
It works on my implementation by adapting to ListAdapter<T, VH>
instead of plain RecyclerView.Adapter<VH>
. However, we need to fork this implementation in order to adapt the changes and refactor some areas in it, like if we want to maintain the current position of the list after invoking next/previous month, particularly the current date position.
from singlerowcalendar.
@forceporquillo can you please share your implementation.
from singlerowcalendar.
Related Issues (20)
- How to disable previous date and current date is selected by default HOT 1
- How can I show only month name?
- Can we add locale for multiple language?
- Great Library.... Just need little Help
- Possibiliy to use the library with a view pager ?
- Usage in Java android Project
- Load dates dynamically
- Current date selection by default HOT 3
- Put selected item in center
- ViewBinding
- Migrating from jcenter() HOT 1
- How can I district week day count to 7?
- is it available for java instead kotlin?
- JCenter is dead HOT 4
- isSelected returns false everytime when i move to next or previous month. HOT 2
- Could not find com.michalsvec:single-row-calednar:1.0.0. HOT 2
- is it possible to use this library with Jetpack Compose? HOT 1
- How to choose the style of the calendar ?
- Item change notification received for unknown item: -9 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from singlerowcalendar.