-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Using the ZoomLayout inside a ViewPager #37
Comments
Can you post a video of this issue? And the XML where the ZoomLayout is |
Using multiple layers of gesture detection is generally a bad idea. |
2018_06_19_09_02_25_trim.zip In the current attachment you can see how it was before to change the layerType This is the layout loaded by the viewpager:
|
Would have to go into the ViewPager internals to see what's wrong. I'll leave this open... About your XML, note that
|
I managed to reproduce the issue in a controlled environment. If you check out this line: https://github.com/tanis2000/ZoomLayoutInsideViewPager/blob/master/app/src/main/res/layout/page.xml#L11 you'll notice that it's set to none. Apparently the other project I was referring to has something that forces that layout to avoid hardware rendering even though the manifest is set to use hardware acceleration. |
Thanks! What if you use hasClickableChildren=true instead of false? I guess the software Canvas somehow is unable to translate, but if you use hasClickableChildren=true, we don't directly use canvas translations. |
Weird. Setting |
If we have clickable children we use high-level (expensive) APIs If the flag is off we move the For some reason the software Canvas is not reacting to translations. |
Ok, I wasn't aware of that. So far forcing hardware rendering seems the most reasonable solution. Is there anything I should be aware of when shipping with that option? Any known compatibility issues with old devices or anything like that? |
@tanis2000 I fear you have to find this out yourself. I don't think there are a lot of devices still out there that don't support hardware rendering but some cheap devices may still exist. Closing this as the issue seems to be resolved. |
@markusressel so far everything is working fine for our client base. Cheers! |
I'm trying to use ZoomLayout as the element of a ViewPager but I'm experiencing a weird issue when swiping to show the next/previous page. It looks like instead of making the new page slide in, it's like if I'm removing an overlay off a page that sits below the current page.
I suppose it's due the layout of the page coming in that is changing dimensions while sliding so that ZoomLayout is adapting the image in a weird way and the final effect is like I'm peeling a layer off a page under the current one. It's nice but it's not what I'm looking for.
Is there any way to temporarily disable this behavior so that it behaves just like an ImageView while sliding in?
Cheers!
The text was updated successfully, but these errors were encountered: