Code example for Point

0
	@SuppressLint("NewApi") 
	public static int getScreenHeight(Activity context) {
 
		Display display = context.getWindowManager().getDefaultDisplay();
		if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) {
			Point size = new Point();
			display.getSize(size);
			return size.y;
		} 
		return display.getHeight();
	} 
 
	/** 
	 * Get the screen width. 
	 *  
	 * @param context 
	 * @return the screen width 
	 */ 
	@SuppressWarnings("deprecation") 
	@SuppressLint("NewApi") 
	public static int getScreenWidth(Activity context) {