android - Different dimensions depending on screen size, one in dp and another to match parent -
this has easy solution haven't been able find after searching online.
i have view want of different height depending on screen size (orientation in cases). have achieved in past having dimens resource file different screen sizes. straight forward if both values in dps. problem in 1 of cases want set dp value , in other case want match_parent.
i don't want re-creating layout this, hoping there solution if both values in dp.
thanks in advance.
there solution!
according this:
match_parenthas integer value,-1.
so in first dimen.xml file, can have 48dp (or whatever) , in second dimen.xml (for other screen sizes example), can have -1px (not dp) , you'll hope for!
Comments
Post a Comment