我可以通過這樣的內部對象正確設置它改變按鈕文本外觀:的Android按鈕textAppearance
<Button
android:id="@+id/login_btn_bypass"
android:textSize="15dp"
android:textColor="#878787"
android:textStyle="bold" />
而不是內使用風格時textAppearance
// in layout xml
<Button
android:id="@+id/login_btn_login"
android:textAppearance="@style/login_button_text_appearance" />
// in style definition
<style name="login_button_text_appearance">
<item name="android:textSize">15dp</item>
<item name="android:textColor">#a7a7a7</item>
<item name="android:textStyle">bold</item>
</style>
任何人知道這是爲什麼?
我在Button上看不到任何android:style,應該如何應用您的建議? –
沒有attribut命名的android:style,它直接命名style,看我的編輯 – Houcine