Value equals to match_parent or fill_parent in dimens.xml?

前端 未结 6 657
春和景丽
春和景丽 2020-12-08 00:12

Based on here on XML Attributes section I specify following in my dimens.xml:

-1dp


        
6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-08 00:51

    Use this, it works for me

    -2px  
    @dimen /custom_wrap_content
    
    -1px  
    @dimen /custom_match_parent
    

    And the Reason why match_parent doesn't run. You cannot supply a build in keyword like match_parent

    Edit: Use px instead of dp as suggested by Jarett Millard in the comments.

提交回复
热议问题