title: Why can't CameraX zoom in a picture as larger as I need in Android Studio?
body: <p>I'm learning CameraX, and <a href="https://github.com/android/camera-samples/tree/master/CameraXBasic" rel="nofollow noreferrer">CameraXBasic</a> is a sample code. </p>
  
  <p>I write a zoomX function based <a href="https://github.com/android/camera-samples/blob/master/CameraXBasic/app/src/main/java/com/android/example/cameraxbasic/fragments/CameraFragment.kt" rel="nofollow noreferrer">CameraFragment.kt</a>. you can see the Code A. I think the function can zoom in a picture any time.</p>
  
  <p>I find that a picture can be zoom in when I invoke it with s a small value, such as <code>zoomX(2f)</code>, <code>zoomX(3f)</code>, but the picture will not be zoom in again when I use a big value such as <code>zoomX(6.0f)</code>, <code>zoomX(7.0f)</code>... why?</p>
  
  <p><strong>Code A</strong></p>
  
  <pre><code>   private lateinit var viewFinder: TextureView 
      private var preview: Preview? = null
  
      fun zoomX(orign: Float ){       
          val x=orign+1
  
          val singleWidth=viewFinder.width/x
          val singleHeight=viewFinder.height/x
  
          val left=viewFinder.width/2f-singleWidth/2f
          val right=left+singleWidth
          val top=viewFinder.height/2f-singleHeight/2f
          val bottom=top+singleHeight
  
          val my= Rect(left.toInt(), top.toInt(), right.toInt(), bottom.toInt())
          preview?.zoom(my)      
      }
  </code></pre>