Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PercentSupportLibrary : Set percentage values in xml?

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?

like image 336
Neoh Avatar asked Jan 07 '23 17:01

Neoh


1 Answers

I just solved it. The values in dimens.xml will be something like this :

<resources>
    <item name="width_percent" type="dimen">60%</item>
</resources>
like image 128
Neoh Avatar answered Jan 28 '23 03:01

Neoh