我创建了一个带有背景颜色的按钮,但是当我点击它时,它没有显示任何内容。
我需要在点击后在按钮上显示不同的颜色,因为用户需要知道按钮已被点击。
我不明白如何做到这一点?
请给我建议。
这是我的按钮代码。
<Button android:textSize="15px"
android:id="@+id/button9"
android:gravity="center|bottom"
android:textColor="@color/myWhiteColor"
android:drawableTop="@drawable/math"
android:text="@string/HomePage_Math"
android:background="@color/myMaroonColor"
android:layout_width="54dp"
android:layout_height="wrap_content" ></Button>