-1

As you can see, My activity_main.xml design isn't show but my coding is still here. I don't know how to make it works. There is no errors.

enter image description here enter image description here

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">

<com.google.android.material.textfield.TextInputLayout
    android:id="@+id/my_text_input_layout"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:hint="@string/enter_activity_name"
    tools:ignore="MissingConstraints">

    <com.google.android.material.textfield.TextInputEditText
        android:id="@+id/my_text_input"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>

</com.google.android.material.textfield.TextInputLayout>

    <TextView
        android:id="@+id/end_icon"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/calendar"
        app:layout_constraintTop_toBottomOf="@id/my_text_input_layout"
        app:layout_constraintStart_toEndOf="@id/my_text_input"
        app:layout_constraintEnd_toEndOf="@id/my_text_input_layout"
        app:layout_constraintHorizontal_bias="0.122"
        app:layout_constraintVertical_bias="0.096"
        tools:ignore="NotSibling" />

</androidx.constraintlayout.widget.ConstraintLayout>

than
  • 17
  • 1
  • 3
  • Try this https://stackoverflow.com/q/73772547 – Adeeksha Sathsara Mar 06 '23 at 02:03
  • Does this answer your question? [Android Studio (Dolphin | 2021.3.1) & (Electric Eel | 2022.1.1) does not show layout preview](https://stackoverflow.com/questions/73772547/android-studio-dolphin-2021-3-1-electric-eel-2022-1-1-does-not-show-la) – iggy12345 Mar 08 '23 at 21:06
  • [Why should I not upload images of code/data/errors when asking a question?](https://meta.stackoverflow.com/q/285551/3404097) [mre] [ask] [Help] – philipxy Apr 06 '23 at 00:19

2 Answers2

0

There are sometimes render issues. Make sure your constraints are correct - if that fails, try and clean project, and invalidate and restart.

0

Updated answer: Install Android Studio's latest version (Flamingo | 2022.2.1). This bug has been resolved.

Previous answer: I worked around the issue by downgrading Android Studio to chipmunk.