Code Monkey home page Code Monkey logo

Comments (14)

nomanr avatar nomanr commented on July 23, 2024

Are you using the calendar view inside a fragment?

from weekcalendar.

Ramfat avatar Ramfat commented on July 23, 2024

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.

strmchsr avatar strmchsr commented on July 23, 2024

yes,
What is the resolution?

from weekcalendar.

michel-t-86 avatar michel-t-86 commented on July 23, 2024

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.

michel-t-86 avatar michel-t-86 commented on July 23, 2024

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.

nomanr avatar nomanr commented on July 23, 2024

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.

michel-t-86 avatar michel-t-86 commented on July 23, 2024

Pull request created

from weekcalendar.

strmchsr avatar strmchsr commented on July 23, 2024

is it fixed?

from weekcalendar.

nomanr avatar nomanr commented on July 23, 2024

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.

cenkgun avatar cenkgun commented on July 23, 2024

I got the same problem. What's the solution?

from weekcalendar.

konstantin-gorbunov avatar konstantin-gorbunov commented on July 23, 2024

me too :(

from weekcalendar.

cenkgun avatar cenkgun commented on July 23, 2024

@konstantin-gorbunov I couldn't solve this problem. Suggest this library, https://github.com/Mulham-Raee/Horizontal-Calendar.

from weekcalendar.

mihir-trivedi-indianic avatar mihir-trivedi-indianic commented on July 23, 2024

Getting the Same Problem is there any solution or anyone get the solution?

from weekcalendar.

mihir-trivedi-indianic avatar mihir-trivedi-indianic commented on July 23, 2024

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.

firstfragmentview
secondfragementview
firstfragementviewaftercomebackfromsecondfragment

from weekcalendar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.