I know this kind of question has been asked many times but none of them helped me.
I want different integer values for my 4, 5 and 5.5 inch devices. For that I have created different values folder like values-small
, values-normal
and values-large
But every time I am getting value from values-normal
only. None of this work for me.
I have also tired to calculate minimum width using following formula. To get minimum width and create folder accordingly.
DisplayMetrics dm = this.getApplicationContext().getResources().getDisplayMetrics();
float screenWidth = dm.widthPixels / dm.density;
float screenHeight = dm.heightPixels / dm.density;
Still I am getting same result. Please help me to figure this out.
My testing devices are HTC ONE X(4.7 inch), Moto G3(5 inch) amd Meizu MX5 (5.5 inch)