Answers for "how to get width on android"

1

how to get android windows width

DisplayMetrics displayMetrics = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(displayMetrics);
int height = displayMetrics.heightPixels;
int width = displayMetrics.widthPixels;
Posted by: Guest on September-28-2020
0

how to get width android

Display display = getWindowManager().getDefaultDisplay();
Point size = new Point();
display.getSize(size);
int width = size.x;
int height = size.y;
Posted by: Guest on December-11-2020

Code answers related to "how to get width on android"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language