Use this, it works for me
<dimen name="custom_wrap_content">-2px</dimen>
<dimen name="horizontal_border_height">@dimen /custom_wrap_content</dimen>
<dimen name="custom_match_parent">-1px</dimen>
<dimen name="vertical_border_height">@dimen /custom_match_parent</dimen>
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.