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

ZoomHelper with multiple fragment #5

Closed
gauravbansod-retailogy opened this issue Dec 22, 2020 · 5 comments
Closed

ZoomHelper with multiple fragment #5

gauravbansod-retailogy opened this issue Dec 22, 2020 · 5 comments

Comments

@gauravbansod-retailogy
Copy link

gauravbansod-retailogy commented Dec 22, 2020

When using zoom helper in activity with multiple fragment , when navigating to new fragment to same activity , it holds instance of previous fragments view , ZooomHelper.release() not working

@Aghajari Aghajari changed the title When using zoom helper in activity with multiple fragment , when navigating to new fragment to same activity , it holds instance of previous fragments view , ZooomHelper.release() not working ZoomHelper with multiple fragment Dec 22, 2020
@Aghajari
Copy link
Owner

Hi @gauravbansod-retailogy ,
check this :
#4 (comment)

@mohitdholakia
Copy link

Hello I am facing this same issue I have also tried the suggested link above but in case of multiple fragments on the same activity it causes this issue

@Aghajari
Copy link
Owner

Hi @mohitdholakia ,
could you share your codes here? or attach a simple project..

@mohitdholakia
Copy link

@Aghajari I have used one main activity which contains four fragments and below is the sample code for Main activity

override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
        return ZoomHelper.getInstance().dispatchTouchEvent(
            ev!!,
            findViewById<FrameLayout>(R.id.aBottomNavigation_frame)
        ) || super.dispatchTouchEvent(ev)
    }

Here every time I switch fragments zoom view contains an old zoomable view so on zooming for first time in another fragment incorrect image will appear

@Aghajari
Copy link
Owner

Hi @mohitdholakia ,
As i said before, This should solve your issue : #4 (comment)

@Aghajari Aghajari closed this as completed Feb 3, 2021
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

3 participants