不同的style使用,其默認的字體顏色不一樣,appCompat的顏色會較淺,而android:Theme較深,
appcompat的style下默認情況下的button的寬高是固定的,所以with和height爲wrap_content的情況下,button的背景會被拉伸成與button的寬高一樣。
可以重新定義默認的屬性如下所示:
<style name="ThemeTranslucent" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="android:windowAnimationStyle">@style/activityAnimation</item>
<item name="android:textColor">@drawable/textcolor_gray3</item>
<item name="android:buttonStyle">@android:style/Widget.Button</item>
</style>
然後再清單文件下使用即可。