[英]How to get x & y of a bitmap, the position of bitmap in the screen
我有一个沿路径移动的位图图像,我想要的是能够在沿路径移动时检索位图的x和y。
谢谢
编辑
我认为您的意思是ImageView而不是Bitmap。 您使用位图设置ImageView的图像,而位图不是视图。
尝试使用
int[] loc = new int[2];
imageView.getLocationOnScreen(loc)
要么
int[] loc = new int[2];
imageView.getLocationInWindow(loc)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.