2

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

kaulex
  • 2,921
  • 3
  • 11
  • 38

4 Answers4

5

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?

ZuzUBA
  • 66
  • 2
3

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

enter image description here

Lena Bru
  • 13,521
  • 11
  • 61
  • 126
  • Doesn't work, Default is Material.Light.NoActionBar. Nevertheless I also tried other themes, still the same error. – kaulex Jan 27 '20 at 20:33
0

in my case Update Android Studio, problem fix

gandalivs
  • 383
  • 3
  • 4
0

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.

prsnlme
  • 179
  • 8