如何创建一个没有文本且图像水平居中的按钮?
我不想使用图像按钮,因为我想定义不同的背景图像
您只需使用 ImageButton 并将背景设置为您想要的任何内容并将图标设置为 src。
<ImageButton
android:id="@+id/ImageButton01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/album_icon"
android:background="@drawable/round_button" />
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)