我进行了很多搜索,但没有找到想要的东西。我打算做的是更改按钮上文本的背景颜色。我对更改点击的颜色不感兴趣。我只想更改按钮上文本的背景。谢谢你。
编辑:这是一个示例。如果可能,我想更改黑色。
在此帮助下创建了此文件,我已将textview正确放置在按钮上,以实现这种效果:
<Button
android:id="@+id/button1"
android:layout_width="250dp"
android:layout_height="150dp"
android:layout_marginLeft="30dp"
android:layout_marginTop="380dp"
/>
<TextView
android:id="@+id/textView1"
android:layout_width="130dp"
android:layout_height="70dp"
android:layout_marginLeft="80dp"
android:layout_marginTop="420dp"
android:textSize="40dp"
android:text="Text"
android:gravity="center"
android:textColor="#ffff00"
android:background="#000000"/>
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句