eltos / SimpleDialogFragments

An Android library to create dialogs with ease and handle user interaction reliably, using fragments and material design.
Apache License 2.0
119 stars 17 forks source link

Issue with input field layout #54

Closed broakenmedia closed 3 years ago

broakenmedia commented 5 years ago

image

broakenmedia commented 5 years ago

Is it possible to provide a custom style to the input?

broakenmedia commented 5 years ago

Presumably this is primarily down to: https://github.com/material-components/material-components-android/issues/120

However the lack of customisation on the edittext means i am unable to workaround for the time being. Particularly lack of ability to set edittext width/height/style/padding/font size etc.

eltos commented 5 years ago

You can customize the style via a custom theme (see customizations > theme in the Wiki)

eltos commented 5 years ago

Can you check whether the issue occures for both, androidx and appcompat based library versions and whether both, SimpleInputDialog and/or SimpleFormDialog are effected?

eltos commented 5 years ago

You can customize the style via a custom theme (see customizations > theme in the Wiki)

Did this work for you?

mtotschnig commented 3 years ago

I run in the same issue after updating material components to 1.2.1 in my project. I think the underlying issue is https://github.com/material-components/material-components-android/issues/1674

mtotschnig commented 3 years ago

My workaround is to build dialogs with the following theme passed in:

    <style name="SimpleDialog" parent="ThemeOverlay.MaterialComponents.Dialog.Alert">
        <item name="textInputStyle">@style/SimpleDialogTextInputStyle</item>
    </style>

    <style name="SimpleDialogTextInputStyle" parent="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox.ExposedDropdownMenu">
        <item name="endIconMode">none</item>
    </style>