kaulex
kaulex

Reputation: 3187

Material edit text not rendering in android studio editor

My android sudio design editor don't render material TextInputLayouts. I already tried invalidate caches. Every other element is rendering correct also other material elements

                   <com.google.android.material.textfield.TextInputLayout
                    android:id="@+id/ti"
                    android:layout_width="match_parent"
                    android:layout_height="match_parent"
                    android:layout_marginTop="20dp"
                    android:layout_marginEnd="30dp"
                    android:layout_marginBottom="20dp"
                    android:hint="@string/street_number">

                    <com.google.android.material.textfield.TextInputEditText
                        android:layout_width="match_parent"
                        android:layout_height="50dp"
                        android:inputType="text"
                        android:text="@{vm.user.streetnumber}" />
                </com.google.android.material.textfield.TextInputLayout>

enter image description here

Upvotes: 2

Views: 1656

Answers (4)

maqsats
maqsats

Reputation: 358

Show all warnings in XML and press to recommendation that wrapped with blue and press modern rendering feature and Restart Android Studio. You can switch off this feature.

Upvotes: 0

gandalivs
gandalivs

Reputation: 403

in my case Update Android Studio, problem fix

Upvotes: 0

ZuzUBA
ZuzUBA

Reputation: 66

You have to change in build.gradle

implementation 'com.google.android.material:material:1.2.0-alpha02'

It seems newer versions are not rendered correctly.

See:how to solve render problem Path.op() not supported?

Upvotes: 5

Lena Bru
Lena Bru

Reputation: 13937

You need to change the theme in the layout builder to match the one of your app.

enter image description here

Upvotes: 3

Related Questions