Code example for Rect

Methods: getWindowVisibleDisplayFrame

0
		Object[] parameters = new Object[0];
		method.invoke(object, parameters);
	} 
 
	private int getStatusbarHeight() { 
		Rect rectangle = new Rect();
		Window window = mSolo.getCurrentActivity().getWindow();
		window.getDecorView().getWindowVisibleDisplayFrame(rectangle);
		return (rectangle.top);
	} 
 
	private int getActionbarHeight() { 
		Float screenDensity = 0.0f;
		try { 
			screenDensity = (Float) PrivateAccess.getMemberValue(Perspective.class, PaintroidApplication.perspective,
					"mScreenDensity"); 
		} catch (Exception e) {
			fail("Getting member mScreenDensity on Perspective failed"); 
		} 
		float actionbarHeight = MenuFileActivity.ACTION_BAR_HEIGHT * screenDensity;
		return ((int) actionbarHeight);