I tried to use following code to get screen width and height in android app development:
Display display = getWindowManager().getDefaultDisplay(); int scree
Display display = getActivity().getWindowManager().getDefaultDisplay(); int screenWidth = display.getWidth(); int screenHeight = display.getHeight(); Log.d("Tag", "Getting Width >> " + screenWidth); Log.d("Tag", "Getting Height >> " + screenHeight);
This worked properly in my application