Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我只需要为缩放/翻译/旋转的 ImageView 处理触摸事件(仅资源部分)。在 ImageView 上设置触摸事件它处理整个屏幕而不是资源部分。任何想法表示赞赏。
通过设置android:adjustViewBounds为 true,ImageView 将调整为资源的大小。当然,布局需要适应这一点。例如,如果您想居中,您可以将 ImageView 放在带有centerInParent.
android:adjustViewBounds
centerInParent