给 Button 上添加 image 的时候如何在 image 的左边加空间,使得 image 左边不会紧靠在Button 的左边。
我使用的下面的代码,效果图是这样的:
<LinearLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginTop="45dp"
android:orientation="horizontal" >
<Button android:id="@+id/MyAccountbutton"
style="?android:attr/buttonStyleSmall"
android:layout_height="25dip"
android:layout_width="fill_parent"
android:layout_marginRight="35dip"
android:layout_marginLeft="35dip"
android:drawableLeft="@drawable/Handshake"
android:background="@drawable/curvedplanebutton"
android:textColor="@drawable/button_text_color"
android:layout_marginTop="15dip"
android:text="Payments"/>
</LinearLayout>
我想实现的是这样的效果:
就是让 Button 上的 image 不要紧靠在 Button 的左边,留点空间。如何实现呢?