Closed androidiapp closed 3 years ago
Hi @androidiapp ,
try to set the fragment as ZoomHelper parent instead of Activity
look at this
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
return ZoomHelper.getInstance().dispatchTouchEvent(ev!!, VIEW ) || super.dispatchTouchEvent(ev)
}
VIEW = the view of the showing fragment
or simply :
override fun dispatchTouchEvent(ev: MotionEvent?): Boolean {
return supportFragmentManager.findFragmentById(R.id.fragment_container)?.view?.let {
ZoomHelper.getInstance().dispatchTouchEvent(ev!!, it)
}!! || super.dispatchTouchEvent(ev)
}
Hi @Aghajari
Thanks for the feedback .
i will check it and let you know .
Hi @Aghajari
It is working for me . Thank you so much .
just one query : size of view got smaller than original when release touch .
zoomHelper.minScale = 1f
its default .
Hello again @androidiapp , can you upload a video ? MinScale is the minimum scale of zooming. not when touch released
[Uploading ZoomHelper.mp4.zip…]()
Hi @Aghajari
Please find the attached video .
Uploading ZoomHelper.mp4.zip…
Hi @Aghajari
Please find the attached video .
This is resolved at my end , it was due to style used in library .
i have changed it to android.R.style.Theme_Translucent_NoTitleBar_Fullscreen and it works .
First of all , Thank you for this awesome library (helps me a lot meeting my requirement in project) , But having one road block explained below -
I am having two RecylerViews in Two Different Fragments inside a same Activity .
Activity -> Fragment1 -> RecyclerView1 -> add ZoomHelper to recyclerview1's item .
Click on bottom Tab and navigate to other fragment (fragment2 is over fragment1).
Activity -> Fragment2 -> Recyclerview2 -> add ZoomHelper to recyclerview2 item
now when zooming recyclerview2's item , i am getting preview of (recyclerview1's item) , if older view is just below new item .
can you please help me with this .
its a requirement .
let me know if you need any further information .