0
我有一个复选框,它将成为我的应用程序的按钮Follow/Follow。 如何更改XML文件中此按钮的文本,而无需为此创建图像? 这可能吗?Android-如何在按下按钮时更改按钮的文字?
这里是我的代码:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/follow_card" android:state_checked="false">
</item>
<item android:drawable="@drawable/following_card" android:state_checked="true"/>
<item android:drawable="@drawable/follow_card"/>
</selector>
Follow_card/Following_card两种定义按钮
http://stackoverflow.com/questions/12889729/change-checkbox-background-color-in-android http://stackoverflow.com/questions/19447523/setting-background-colour-on-check-box-in-android – user2450263