通过什么api,谢谢
------解决方案--------------------
First you need to get the WindowManager by :
WindowManager wm = getSystemService(Context.WINDOW_SERVICE);
Next use the method to retrieve a Display object:
Display d = wm.getDefaultDisplay();
and finally the resolution:
int height = d.getHeight();
int width = d.getWidth();