I tried to use following code to get screen width and height in android app development:
Display display = getWindowManager().getDefaultDisplay(); int scree
This is what finally worked for me:
DisplayMetrics metrics = this.getResources().getDisplayMetrics(); int width = metrics.widthPixels; int height = metrics.heightPixels;