我有一个按钮。
这行代码:
<Button
android:id="@+id/learn"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop ="5dp"
android:text="Hello StackOverflow"
style="@style/home_page_buttons"
/>
我正在尝试为它添加这种样式
<style name="home_page_buttons">
<item name="android:layout_marginLeft">15dp</item>
<item name="android:layout_marginRight">15dp</item>
<item name="android:textColor">@color/light_best_blue</item>
<item name="android:textStyle">bold</item>
<item name="android:color">@color/white</item>
<item name="android:background">@color/white</item>
</style>
这行代码:
<item name="android:background">@color/white</item>
将背景变为我想要的白色,但出于某种原因,它缩小了按钮的高度,并使其变得难看。
有什么想法是为什么会发生这种情况以及如何防止此副作用?
谢谢!