我正在做一个地图应用程序,我需要在“点击”区域上画一些圆圈。
我能够获得“点击”的 x 和 y 坐标。我已经尝试过使用画布、位图和类似的东西,我的圈子一直在替换整个图像,并且不会停留在被点击的位置上。
我正在使用 PhotoView 库来操作图像(缩放、滚动等)。
@Override
public void onPhotoTap(View view, float x, float y) {
//and here should go the code to make the circle
//appear over the x y tapped point of the image
Toast.makeText(getBaseContext(), "Tap " + x + " " + y, Toast.LENGTH_SHORT).show();
}