if i use the code shown here to get the total screen size it is always short on height to the total screen size as shown in the documented specs for the device. for example
try this code...
Display display = context.getWindowManager()
.getDefaultDisplay();
int width = display.getWidth();
int height=display.getHeight();
it will give screen's width and height,And according to width and height write if- conditions for each device's screen resolution.