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

Don't let specific imageview receive the zoom inside a ZoomLayout #163

Closed
lucasrsv opened this issue Jun 25, 2020 · 3 comments
Closed

Don't let specific imageview receive the zoom inside a ZoomLayout #163

lucasrsv opened this issue Jun 25, 2020 · 3 comments

Comments

@lucasrsv
Copy link

lucasrsv commented Jun 25, 2020

I'm using the ZoomLayout, inside of it I have some imageviews that work as a menu, like that:

<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

    <com.otaliastudios.zoom.ZoomLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:id="@+id/skyZoomLayout"
        app:minZoom="1.0"
        app:maxZoom="5.0"
        app:hasClickableChildren="true">

            <FrameLayout
                android:layout_width="match_parent"
                android:layout_height="match_parent"
                android:id="@+id/sky">

                    <ImageView
                        android:id="@+id/button1 >

                    <ImageView
                        android:id="@+id/button1 >

            </FrameLayout>

    </com.otaliastudios.zoom.ZoomLayout>

</layout>

`
But I don't want these specific imageviews to receive the zoom, because they're a simple static menu on the bottom-left part of the screen. Is there a way to do it?

@markusressel
Copy link
Collaborator

If you don't want them to be a part of the ZoomLayout why did you put them inside of it? Can you put your menu outside of the ZoomLayout as an overlay?

@lucasrsv
Copy link
Author

If you don't want them to be a part of the ZoomLayout why did you put them inside of it? Can you put your menu outside of the ZoomLayout as an overlay?

I had tried it, but unsuccesfully, because the ImageViews used to disappear. But I just found out the property android: elevation, changed it to 2dp and they're now appearing without receiving the zoom.

Thanks and sorry for the issue, at the end it was a silly problem, but it was my first issue hahah.

@markusressel
Copy link
Collaborator

Glad you got it working 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants