Get the center coordinates of phone screen
问题 Can someone give me an example of how to get the center coordinates of the current displayed screen? I would like my objects to always be relative to the center coordinates of the active view. 回答1: You can try with DisplayMetrics to achieve your solution int mWidth= this.getResources().getDisplayMetrics().widthPixels; int mHeight= this.getResources().getDisplayMetrics().heightPixels; 回答2: Here is how I resolved the issue. As a background, I have a button that once the user moves the map to