Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我试图在不改变按钮大小的情况下增加 ImageButton 中图片的大小,这可能吗?
是的,您可以通过为按钮布局添加填充来增加它。请参阅我的示例 XML 代码有填充
<ImageButton android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Text" android:padding="20dp" android:background="@drawable/my_button" />