I am getting the screen resolutions with the help of the following code snippet.
DisplayMetrics displaymetrics = new DisplayMetrics();
getActivity().getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
int height = displaymetrics.heightPixels;
int width = displaymetrics.widthPixels;
int totalsize=height*width;
Now I want to classify the screens in hdpi,mdpi,xhdpi,xxhdpi and xxxhdpi through getting resolution.
Since each phone of same screen size has different resolution so can someone tell me which resolution range is for which density ? for example if the resolution is : 1920 x 1080. In which screen density does it classify in?