Neoh Neoh -4 years ago 30
Android Question

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
?

Answer Source

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

<resources>
    <item name="width_percent" type="dimen">60%</item>
</resources>
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download