简体   繁体   English

如何将像素位置(x和y坐标)从一个Android设备转换为其他Android设备?

[英]How do I convert a pixel location (x and y coordinates) from one Android device to other Android devices?

如何将像素位置(x和y坐标)从一个Android设备转换为具有不同屏幕尺寸和不同分辨率的其他Android设备?

一种方法:将x,y除以屏幕宽度和高度,得到一个从0.0到1.0的浮点数,然后将这两个因子乘以第二个设备的屏幕宽度和高度。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android:MotionEvent的x和y像素不会转换为图像坐标 - Android: MotionEvent's x and y pixel do not translate to image coordinates 如何将归一化设备坐标转换为 Android 上 canvas 的像素坐标? - How to convert Normalized Device Coordinates to pixel coordinates for canvas on Android? 如何在Android中的不同设备和密度上获取imageview的x,y坐标 - How to get x,y coordinates of an imageview on different devices and densities in Android 如何在Android中正确地将像素坐标转换为画布坐标? - How do I correctly translate pixel coordinates to canvas coordinates in Android? 将x和y坐标从一个Android设备转换为另一个独立于分辨率的设备 - convert x and y coordinate from one android device to another independent of resolution 从一个Android设备获取字符串并发送到其他设备 - Getting string from one android device and sending to other devices 如何在Android中获取水龙头的X和Y坐标? - How can I get the X, and Y, coordinates of a tap on a view in Android? 给定一组向量(x / y坐标),我如何将其转换为PNG文件(android canvas缺陷)? - given a set of vectors (x/y coordinates ), how do i make that into a PNG file (android canvas deficiency)? Android:如何获取图像/ ImageView中的xy坐标? - Android: How do I get the x y coordinates within an image / ImageView? Android:如何从(x,y)坐标计算图像的纬度和经度? - Android:How to calculate latitude and longitude of an image from (x,y) coordinates?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM