0
我有一个布局,看起来像这样:安卓触摸时缩放动画后onTouch事件发生外
<FrameLayout
android:id="@+id/container"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >
<ImageView
android:id="@+id/image"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:scaleType="center"/>
</FrameLayout>
“形象”是全屏幕开始。有一个onTouchListener设置为“图像”,它工作正常。然后我缩放“形象”与ScaleAnimation(约一半大小),我会希望发生的是,当“图像”摸着onTouchListener只会回暖,但它仍是起火的整个屏幕和信息getX得到了相同的值为getRawX。
是否有任何方式检测我是否在onTouch中的图像边界内?我想根据规模价值对界限进行硬编码,但是肯定必须有更优雅的解决方案?