This code will give you the screen resolution at run time.
The size of your application may differ due to the status and title bar.
The size of your application may differ due to the status and title bar.
@Override
public void onCreate(Bundle icicle) {
WindowManager w = getWindowManager();
Display d = w.getDefaultDisplay();
int width = d.getWidth();
int height = d.getHeight();
}
Display.getWidth() and Display.getHeight deprecated in API13
ReplyDeleteSome important articles like ExoPlayer, Camera2API YouTube, AndroidJetpack and design patten related can add also here
ReplyDelete