0

I had to adjust the layout dimensions for HDPI devices. So, I added the dimensions in values-hdpi folder.

dimen decleration in values-hdpi folder

<resources>
    <dimen name="tracking_activity_marging_top">8dp</dimen>
</resources>

dimenn decleration in values folder

<resources>
  <dimen name="tracking_activity_marging_top">14dp</dimen>
</resources>

The dimen value defined in values-hdpi folder is correctly picked in HDPI device. But, XXHDPI device (and device with non-hdpi resolution) picked the value from values-hdpi folder instead of normal values folder.

Why non-hdpi devices are picking values from hdpi folder? How can I solve it?

  • The issue is happening in a library module. The dimens are picking correctly in app module.
Suneesh Ambatt
  • 1,347
  • 1
  • 11
  • 41

1 Answers1

0

Each modules have its own resource folder, you might want to add dimens qualifier depending on screen dpi for library module too.

T LABS
  • 15
  • 4
  • That's what I did. The library module dependency is added in app module. So, we won't be able access the dimen value in app module from a library module. – Suneesh Ambatt Jul 26 '23 at 13:13