Comments (14)
Are you using the calendar view inside a fragment?
from weekcalendar.
I am using my calendar view inside an AppCompatActivity and have the same problem. So using getChildFragmentManager will not work in this instance (if that is what you were gonna suggest).
from weekcalendar.
yes,
What is the resolution?
from weekcalendar.
This is a memory leak issue.
When the activity is destroyed, somehow the WeekPager of the WeekCalendar view remains in memory.
When a new activity is created and a call is made to a fresh WeekCalendar, the BusProvider dispatches the event to both the leaked WeekPager and the new WeekPager.
The event will work fine for the new WeekPager but will fail for the old one.
I don't know enough about Views' lifecycle to fix it but I've done a temporary hack in WeekPager by surrounding the code of every method marked as @subscribe with a try/catch.
from weekcalendar.
Found it.
BusProvider is a singleton that is never disposed of and hence maintains a reference to methods within the old WeekPager.
I'll fix it and do a pull request when I get around to it.
from weekcalendar.
You are welcome to contribute to this library and fix the issue you found.
On Feb 1, 2016 9:50 PM, "BroScience repository" [email protected]
wrote:
Found it.
BusProvider is a singleton that is never disposed of and hence maintains a
reference to methods within the old WeekPager.Implement the proper design pattern and it fixes it.
—
Reply to this email directly or view it on GitHub
#8 (comment).
from weekcalendar.
Pull request created
from weekcalendar.
is it fixed?
from weekcalendar.
Yes, you need to download and add the library. Haven't updated in on Maven
yet.
On Feb 2, 2016 4:08 PM, "shashank090789" [email protected] wrote:
is it fixed?
—
Reply to this email directly or view it on GitHub
#8 (comment).
from weekcalendar.
I got the same problem. What's the solution?
from weekcalendar.
me too :(
from weekcalendar.
@konstantin-gorbunov I couldn't solve this problem. Suggest this library, https://github.com/Mulham-Raee/Horizontal-Calendar.
from weekcalendar.
Getting the Same Problem is there any solution or anyone get the solution?
from weekcalendar.
I will get the solution for only to prevent a crash. Change BusProvider lib
from com.squareup:otto
to org.greenrobot:eventbus
But it will not override the WeekCalendar view in newly added fragment also not showing the days. And previous fragment's WeekCalander makes disabled.
from weekcalendar.
Related Issues (20)
- Bug , while putting weekcalendar into viewpager HOT 2
- Caused by: java.lang.ClassCastException: com.zing.chat.activity.MainActivity cannot be cast to android.support.v7.app.AppCompatActivity HOT 1
- Enable scroll only for current month.
- min Date and Max Date HOT 1
- text days uppercase
- About week count of year
- Show month name
- Proguard Rules for this library HOT 2
- how can setNextweek and setPervious on button ckick HOT 1
- Dates Selected
- How can i use in Xamarin.Android?
- after proguard why click event not work
- Unable to inflate it HOT 2
- It's possible to select month also like days
- not auto scroll on programmatically selected date HOT 1
- Selected Background
- Calendar Not Display in View pager with Fragment HOT 1
- add day from sunday HOT 1
- Not a best library to add in Fragment or ViewPager
- app:todaysDateTextColor not found
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 weekcalendar.