Reputation: 16174
I want to use different layout width ratios for larger tablet screens. Is there a way to set percentage based (fraction-type) values such as layout_widthPercent
and layout_marginStartPercent
in dimens.xml
?
Upvotes: 4
Views: 1395
Reputation: 111
I'm not sure if anyone else has had this problem since 2015 but, you can use a fraction tag:
<fraction name="dialog_anim_y_scale">14.285571%</fraction>
Upvotes: 1
Reputation: 16174
I just solved it. The values in dimens.xml
will be something like this :
<resources>
<item name="width_percent" type="dimen">60%</item>
</resources>
Upvotes: 8