Code example for Display

Methods: getSize

0
	private void init(Context context) {
		WindowManager wm = (WindowManager) context.getSystemService(Context.WINDOW_SERVICE);
		Display display = wm.getDefaultDisplay();
		Point size = new Point();
		 
		display.getSize(size);
		_centerPoint.x = size.x / 2;
		_centerPoint.y = size.y / 2;
		 
		_paint.setARGB(128, 128, 192, 128);
		_paint.setStrokeWidth(10);
	} 
	 
	@Override 
	protected void onDraw (Canvas canvas) {
		super.onDraw(canvas);
		 
		int r=0;
		int x;
		int y;
Stop searching for code, let great code find you!  Add Codota to your java IDE