0

I started to do some basic Android App development in Android Studio. Now I am facing a bigger problem:

When I drag an Element (e.g. Button) to the Designer view, the Element does not appear (or is invisible). In the Text passage it's present, but does not show up in the Design view.

The generated text looks like this

    <Button
    android:id="@+id/loginBtn"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Button"
    tools:layout_editor_absoluteX="91dp"
    tools:layout_editor_absoluteY="380dp" />

<EditText
    android:id="@+id/nameText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:inputType="textPersonName"
    android:text="Name"
    tools:layout_editor_absoluteX="228dp"
    tools:layout_editor_absoluteY="428dp" />

<EditText
    android:id="@+id/passwordText"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:ems="10"
    android:inputType="textPassword"
    tools:layout_editor_absoluteX="16dp"
    tools:layout_editor_absoluteY="220dp" />
DrEichenbach
  • 382
  • 1
  • 2
  • 13

1 Answers1

0

Make sure XML is error free.Top right of the Design tab if you hit show warning and errors, i'm getting some warnings when I posted that XML.Address those warnings and see if that fixes your issue.I would also try File > Invalidate Cache/Restart.

  • thanks, I found an error which leaded me to this answer https://stackoverflow.com/questions/44223687/render-error-in-android-studio-3-0-layout-editor#45002903 – DrEichenbach Jun 10 '18 at 14:28