开发者

Different border width for button

开发者 https://www.devze.com 2023-03-27 05:37 出处:网络
how can I set different width for a button on android? Like top and bottom are 2dp but le开发者_运维技巧ft and right are 4dp? Thank you.

how can I set different width for a button on android? Like top and bottom are 2dp but le开发者_运维技巧ft and right are 4dp? Thank you.

Update:

My apology if my question is unclear. It is not margin or padding. But I would like to customise the width like border-top or border-left in css. Is it possible in android?


Your question is not clear.Are you looking something like following?

<Button 
android:text="Button"
android:layout_marginTop="2dp"
android:layout_marginBottom="2dp" 
android:layout_marginLeft="4dp"
android:layout_marginRight="4dp"
android:id="@+id/button1" 
android:layout_width="wrap_content" 
android:layout_height="wrap_content">
</Button>
0

精彩评论

暂无评论...
验证码 换一张
取 消