get Default Display Size - Android android.hardware

Android examples for android.hardware:Camera Size

Description

get Default Display Size

Demo Code

import android.app.Activity;
import android.graphics.Point;

public class Main {

   static Point getDefaultDisplaySize(Activity activity, Point size) {
    activity.getWindowManager().getDefaultDisplay().getSize(size);
    return size;/* w  ww . j av a 2 s  .com*/
  }

}

Related Tutorials