アプリのいくつかのボタンの高さを変更しようとしています。
@android:color/transparent
として設定してみました。また、のような値にandroid:background
設定してみました。layout_height
16dp
ボタンの高さを低くするにはどうすればよいですか?
スタイルxmlは次のとおりです。
<style name="Theme.PMBAppTheme.TextButton">
<item name="android:textStyle">bold</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">@drawable/text_button_text</item>
<item name="android:background">#ff3300</item>
<item name="android:padding">0dp</item>
<item name="android:height">20sp</item>
</style>
そしてレイアウト:
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/register_btn_privacy"
android:text="@string/privacy_policy"
style="@style/Theme.PMBAppTheme.TextButton"
/>
text_button_text
:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item android:state_focused="true" android:state_pressed="true" android:color="@color/muted_pink_over" />
<item android:state_focused="false" android:state_pressed="true" android:color="@color/muted_pink_over" />
<item android:color="@color/muted_pink" />
</selector>