Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layout broke with new material components #74

Open
LipeDuoli opened this issue May 8, 2019 · 7 comments
Open

Layout broke with new material components #74

LipeDuoli opened this issue May 8, 2019 · 7 comments

Comments

@LipeDuoli
Copy link

General information

  • SDK/Library version: 4.2.0

Issue description

Using the new material components, the 2 new variants of EditText layout is a little broke.
card_form_FilledBox
card_form_OutlinedBox

@quinnjn
Copy link
Contributor

quinnjn commented May 9, 2019

I made a sample app to try this: https://github.com/quinnjn/android-card-form-issue-74

Using the latest stable, and alpha versions of material didn't show any changes to CardForm, but I think I'm missing the details. Can you provide a PR to that above example repository to put CardForm in the problematic state?

@LipeDuoli
Copy link
Author

Hi @quinnjn , PR done.

@alashow
Copy link

alashow commented Jun 21, 2020

@quinnjn Apparently it's because of the theme. It works as expected with appcompat themes, but not material components themes.

In your sample, the app theme is set to Theme.AppCompat.Light.DarkActionBar and the problem occurs when the theme is set to theme like Theme.MaterialComponents.Light.

@alashow
Copy link

alashow commented Jun 21, 2020

Can be fixed by overriding bt_text_input_layout style and extending legacy input layout style Widget.Design.TextInputLayout:

<style name="bt_text_input_layout" parent="@style/Widget.Design.TextInputLayout">
        <item name="android:layout_width">match_parent</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:layout_marginTop">12dp</item>
        <item name="android:accessibilityLiveRegion" tools:targetApi="kitkat">polite</item>
</style>

@asknask
Copy link

asknask commented Nov 17, 2020

Can confirm this problem exists, and renders the form useless frankly. Tried the fix me mentioned above and it works.

@NissanRayappu5235
Copy link

I couldnt overwrite to change the text color inside of textfield.mine remains in white color

@NissanRayappu5235
Copy link

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants