update mLastClickX and Y only at Down action
This commit is contained in:
parent
7ffe53a0ae
commit
328c4300a5
|
@ -13,6 +13,7 @@ import android.os.Build
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.HandlerThread
|
import android.os.HandlerThread
|
||||||
import android.util.Size
|
import android.util.Size
|
||||||
|
import android.view.MotionEvent
|
||||||
import android.view.Surface
|
import android.view.Surface
|
||||||
import android.view.TextureView
|
import android.view.TextureView
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
|
@ -63,8 +64,10 @@ class PreviewCameraTwo : ViewGroup, TextureView.SurfaceTextureListener, MyPrevie
|
||||||
mTextureView = textureView
|
mTextureView = textureView
|
||||||
|
|
||||||
mTextureView.setOnTouchListener { view, event ->
|
mTextureView.setOnTouchListener { view, event ->
|
||||||
mLastClickX = event.x
|
if (event.action == MotionEvent.ACTION_DOWN) {
|
||||||
mLastClickY = event.y
|
mLastClickX = event.x
|
||||||
|
mLastClickY = event.y
|
||||||
|
}
|
||||||
false
|
false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue