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

Child view in ZoomLayout is not centered #40

Closed
kuoliangkwong opened this issue Jun 28, 2018 · 4 comments
Closed

Child view in ZoomLayout is not centered #40

kuoliangkwong opened this issue Jun 28, 2018 · 4 comments

Comments

@kuoliangkwong
Copy link

kuoliangkwong commented Jun 28, 2018

Hi I'm using the following code but could not get ZoomLayout child view centered:

  <com.otaliastudios.zoom.ZoomLayout
      android:layout_width="match_parent"
      android:layout_height="450dp"
      android:layout_gravity="center"
      android:scrollbars="vertical|horizontal"
      app:horizontalPanEnabled="true"
      app:verticalPanEnabled="true"
      app:zoomEnabled="true"
      app:hasClickableChildren="true">

      <com.xiaopo.flying.sticker.StickerView
          android:id="@+id/sticker_view"
          android:layout_width="253dp"
          android:layout_height="450dp"
          android:layout_gravity="center"
          android:background="#CCC"
          app:showBorder="true"
          app:showIcons="true"
          />

  </com.otaliastudios.zoom.ZoomLayout>

The result:
device-2018-06-28-111900
The grey area view should in center

@ahmadazarnia
Copy link

i have same problem

@markusressel
Copy link
Collaborator

Did you try setting transformationGravity?

@markusressel
Copy link
Collaborator

I'm closing this because of inactivity. Feel free to reopen if your issue persists.

@AbhisKmr
Copy link

AbhisKmr commented Jun 9, 2020

I have tried transformationGravity = "center", but issue not resolved @markusressel

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

4 participants