1

I have several android devices

with the same resolution (xxhdpi) and the same density.

However, physically they have different screen sizes. (one is taller and wider, and the other shorter and narrower)

I have scoured the support different screen sizes page, and did not find something that would help me.

I want to create different folders with res/values/dimens.xml that will contain different text sizes appropriate for my device.

I do not want to programmatically calculate the correct text size (although it seems like the only viable option for now). I want the system to select the correct folder with the appropriate screen size text size.

How do I name my folders, to achieve my goal? Maybe I need to do something else ?

Lena Bru
  • 13,521
  • 11
  • 61
  • 126

1 Answers1

1

how about set text size programmatically??

int size = 30; // as you want
textView.setTextSize(size * getResources().getDisplayMetrics().density);
S T
  • 1,068
  • 2
  • 8
  • 16
  • this is exactly what i said i didnt want to do – Lena Bru Nov 11 '20 at 03:45
  • maybe this post help https://stackoverflow.com/a/12620551/10778405 – S T Nov 11 '20 at 04:04
  • this is not relevant for me, as my app is not designed for tablets, i need to differenciate between two devices with similar characteristics and different physicall screen sizes, but they are still phones – Lena Bru Nov 11 '20 at 05:38