2015/10/31

Android 取得螢幕寬高

Code:
  DisplayMetrics metrics = new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(metrics);
  screenHeight = metrics.widthPixels;
  screenWidth = metrics.heightPixels;