Knowcode relative layout using constraints not working

I’ve created a layout in android studio:

But when I Run my app in VS Code it looks like:

Below is my xml layout:

<?xml version="1.0" encoding="utf-8"?>

<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="fill_parent"

android:layout_height="fill_parent"

android:background="#C0C0C0"

tools:context=".MainActivity">

<ImageButton

    android:id="@+id/ImageButtonWorkSession"

    android:layout_width="256dp"

    android:layout_height="256dp"

    android:background="@drawable/cbWorkSessionImageUp"

    app:layout_constraintEnd_toStartOf="@+id/ImageTimeclock"

    app:layout_constraintStart_toStartOf="parent"

    app:layout_constraintTop_toTopOf="parent"

    app:layout_constraintBottom_toBottomOf="parent"

    app:layout_constraintVertical_bias="0.2"

    tools:ignore="MissingConstraints"

/>

<ImageButton

    android:id="@+id/ImageTimeclock"

    android:layout_width="256dp"

    android:layout_height="256dp"

    android:background="@drawable/cbTimeclockImageUp"

    app:layout_constraintEnd_toEndOf="parent"

    app:layout_constraintStart_toEndOf="@+id/ImageButtonWorkSession"

    app:layout_constraintTop_toTopOf="parent"

    app:layout_constraintBottom_toBottomOf="parent"

    app:layout_constraintVertical_bias="0.2"

    tools:ignore="MissingConstraints"

/>

<TextView

    android:id="@+id/WorkLabel"

    android:layout_width="wrap_content"

    android:layout_height="wrap_content"

    android:text="Work"

    android:textColor="#000000"

    android:textSize="22dp"

    app:layout_constraintStart_toStartOf="@+id/ImageButtonWorkSession"

    app:layout_constraintEnd_toEndOf="@+id/ImageButtonWorkSession"

    app:layout_constraintTop_toBottomOf="@+id/ImageButtonWorkSession"

    tools:ignore="MissingConstraints"

/>

<TextView

    android:id="@+id/TimecardLabel"

    android:layout_width="wrap_content"

    android:layout_height="wrap_content"

    android:text="Timecard"

    android:textColor="#000000"

    android:textSize="22dp"

    app:layout_constraintTop_toBottomOf="@+id/ImageTimeclock"

    app:layout_constraintStart_toStartOf="@+id/ImageTimeclock"

    app:layout_constraintEnd_toEndOf="@+id/ImageTimeclock"

    tools:ignore="MissingConstraints"

/>

<Button

    android:id="@+id/LanguageButton"

    android:layout_width="0dp"

    android:layout_height="wrap_content"

    android:layout_margin="20dp"

    android:text="English"

    android:textSize="28sp"

    app:layout_constraintHorizontal_chainStyle="packed"

    app:layout_constraintBottom_toBottomOf="parent"

    app:layout_constraintEnd_toStartOf="@+id/ManagementButton"

    app:layout_constraintStart_toStartOf="parent"

/>

<Button

    android:id="@+id/ManagementButton"

    android:layout_width="0dp"

    android:layout_height="wrap_content"

    android:layout_margin="20dp"

    android:text="Management"

    android:textSize="28sp"

    app:layout_constraintBottom_toBottomOf="parent"

    app:layout_constraintEnd_toEndOf="parent"

    app:layout_constraintStart_toEndOf="@+id/LanguageButton"

    />

</androidx.constraintlayout.widget.ConstraintLayout>

Hello cboucher, how are you?

Constraint layout in Knowcode-xml is still a working process and its open source feel free to contribute. There are still things that aren’t fully supported. Feel free to look in our embedded sample repository. There are a lot of samples which use knowcode like home-appliance or printer-device.