I need to set different layout weights for different screen size devices and I want to pass the values from the dimens file, the problem is that the reference from the dimens file keeps throwing errors
error: Error: Integer types not allowed (at 'progress_widget_item3_weight' with value '9').
or
error: Error: Float types not allowed (at 'progress_widget_item3_weight' with value '9.1').
<dimen name="progress_widget_item3_weight">9</dimen>
How do I pass the value from the dimens file for the layout_weight ? Thank you
Instead of dimensions you can use integer to declare and reference integers.
Example declaration in integers.xml:
Example reference in layout: