Change text field style for decrease height
This commit is contained in:
parent
0a48fc586e
commit
083929512d
2 changed files with 16 additions and 2 deletions
|
@ -34,12 +34,11 @@
|
|||
|
||||
<com.google.android.material.textfield.TextInputLayout
|
||||
android:id="@+id/color_hex_text_input"
|
||||
style="@style/Widget.MaterialComponents.TextInputLayout.FilledBox"
|
||||
style="@style/CompactInputLayoutStyle"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
app:boxBackgroundColor="@color/material_text_input_layout_bg"
|
||||
app:hintEnabled="false"
|
||||
app:prefixText="#">
|
||||
|
||||
<com.google.android.material.textfield.TextInputEditText
|
||||
|
|
|
@ -793,4 +793,19 @@
|
|||
<item name="hintTextColor">?android:textColorSecondary</item>
|
||||
</style>
|
||||
|
||||
|
||||
<style name="CompactInputLayoutStyle" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
|
||||
<item name="materialThemeOverlay">@style/ThemeCompactOverlayOutlinedDense</item>
|
||||
<item name="hintEnabled">false</item>
|
||||
</style>
|
||||
|
||||
<style name="ThemeCompactOverlayOutlinedDense">
|
||||
<item name="editTextStyle">@style/CompactTextInputEditTextOutlinedBoxDense</item>
|
||||
</style>
|
||||
|
||||
<style name="CompactTextInputEditTextOutlinedBoxDense" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense">
|
||||
<item name="android:paddingTop">@dimen/content_padding_half</item>
|
||||
<item name="android:paddingBottom">@dimen/content_padding_half</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Reference in a new issue