android获取当前窗口的宽度和高度

WindowManager winManager=(WindowManager)getSystemService(Context.WINDOW_SERVICE);
setTitle(winManager.getDefaultDisplay().getWidth()+"*"+winManager.getDefaultDisplay().getHeight());

你可能感兴趣的:(android,service)