It varies from device to device. You have to make generic ways to draw the screens. If you're setting xml layouts, then you can set widths and heights using the various notations.
What is the difference between "px", "dp", "dip" and "sp" on Android?
If you're setting the size dynamically at runtime, then screen size can be obtained through the "Display" class.
WindowManager wm = (WindowManager) getSystemService(Context.WINDOW_SERVICE);
Display display = wm.getDefaultDisplay();
Log.d(TAG, "Height = " + display.getHeight() + " Width = " + display.getWidth());
The width and height will be adjusted depending on your orientation of the phone.
The information is generally given to you through the onDraw methods through the Canvas object. You can use canvas.getWidth() to get the width of the screen and canvas.getHeight() to get the height of the screen.