3
我自定義的按鈕樣式'colorButtonNormal' 工作作爲按下狀態
<style name="custom_button" parent="@android:style/Widget.Button">
<item name="android:paddingTop">5dp</item>
<item name="android:paddingBottom">5dp</item>
<item name="android:textAllCaps">false</item>
<item name="colorButtonNormal">#f37022</item>
<item name="android:textColor">#ffffff</item>
</style>
使用作爲
<Button
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="Prepaid Package"
style="@style/custom_button"/>`
但在colorButtonNormal
顏色有出現在On press
狀態。
現在該做什麼?
'colorButtonNormal'應該是在'正常狀態'下工作,但它正在'按下'狀態下工作。 我知道答案的方式。但是我想在styles.xml中定義樣式 – Sudarshan