Code example for Window

Methods: getDecorView

0
	 *            window of application 
	 *  
	 * @return height of status bar in pixel 
	 */ 
	public static int getStatusBarHeight(Window window) {
		window.getDecorView().getWindowVisibleDisplayFrame(mStatusBarRect);
		return mStatusBarRect.top;
	} 
	 
	/** 
	 * Get title bar height.<br> 
	 * <br> 
	 * <b>Note</b>: Call this when content is completely inflated. So {@code onCreate} of an 
	 * activity won't work. 
	 *  
	 * @param window 
	 *            window of application 
	 *  
	 * @return height of status bar in pixel 
	 */ 
Experience pair programming with AI  Get Codota for Java