I tried to use following code to get screen width and height in android app development:
Display display = getWindowManager().getDefaultDisplay(); int scree
Try via context.getResources().getDisplayMetrics() if you have a context available.
context.getResources().getDisplayMetrics()