Android How To Get Width Of Widows

[Solved] Android How To Get Width Of Widows | Swift - Code Explorer | yomemimo.com
Question : how to get android windows width

Answered by : ill-ibis-63u76bmkb3ph

DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int height = displayMetrics.heightPixels;
int width = displayMetrics.widthPixels;

Source : https://stackoverflow.com/questions/4743116/get-screen-width-and-height-in-android | Last Update : Mon, 05 Oct 20

Question : android how to get width of widows

Answered by : ill-ibis-63u76bmkb3ph

DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int height = displayMetrics.heightPixels;
int width = displayMetrics.widthPixels;

Source : https://stackoverflow.com/questions/4743116/get-screen-width-and-height-in-android | Last Update : Wed, 22 Apr 20

Answers related to android how to get width of widows

Code Explorer Popular Question For Swift