按钮的不同边框宽度

问题描述:

如何在android上设置按钮的不同宽度?像顶部和底部是2DP,但左右是4DP?谢谢。按钮的不同边框宽度

更新:

我的道歉,如果我的问题是不清楚。这不是保证金或填充。但我想自定义宽度像边界顶部或左边的CSS在CSS中。在android中可能吗?

+3

你的问题是不明确的..你怎么可以设置顶部和底部2DP ..你不能设置宽度的方式......它可以是高度和宽度.. – ngesh

+0

你的意思是填充或保证金? – ayublin

+0

@ayubin n ntc,我的问题已更新。谢谢。 – davidlee

你的问题不清楚,你看起来像下面的东西吗?

<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

我的问题已更新。谢谢。 – davidlee