Which code snippet would achieve the layout displayed below?

  • xml
    <androidx.constraintlayout.widget.ConstraintLayout
    …>
    <TextView
    android:id=”@+id/text_dashboard”
    android:layout_width=”match_parent”
    android:layout_height=”wrap_content”
    android:layout_marginTop=”16dp”
    android:padding=”8dp”
    android:textAlignment=”center”
    android:text=”Dashboard”
    app:layout_constraintEnd_toEndOf=”parent”
    app:layout_constraintStart_toStartOf=”parent”
    app:layout_constraintTop_toTopOf=”parent” />
    </androidx.constraintlayout.widget.ConstraintLayout>
  • xml
    <androidx.constraintlayout.widget.ConstraintLayout
    …>
    <TextView
    android:id=”@+id/text_dashboard”
    android:layout_width=”match_parent”
    android:layout_height=”wrap_content”
    android:layout_marginStart=”8dp”
    android:layout_marginEnd=”8dp”
    android:textAlignment=”center”
    android:text=”Dashboard”
    app:layout_constraintEnd_toEndOf=”parent”
    app:layout_constraintStart_toStartOf=”parent”
    app:layout_constraintTop_toTopOf=”parent” />
    </androidx.constraintlayout.widget.ConstraintLayout>
  • xml
    <androidx.constraintlayout.widget.ConstraintLayout
    …>
    <TextView
    android:id=”@+id/text_dashboard”
    android:layout_width=”match_parent”
    android:layout_height=”wrap_content”
    android:layout_marginStart=”8dp”
    android:layout_marginTop=”16dp”
    android:layout_marginEnd=”8dp”
    android:padding=”8dp”
    android:textAlignment=”center”
    android:text=”Dashboard”
    app:layout_constraintEnd_toEndOf=”parent”
    app:layout_constraintStart_toStartOf=”parent”
    app:layout_constraintTop_toTopOf=”parent” />
    </androidx.constraintlayout.widget.ConstraintLayout>
  • xml
    <androidx.constraintlayout.widget.ConstraintLayout
    …>
    <TextView
    android:id=”@+id/text_dashboard”
    android:layout_width=”match_parent”
    android:layout_height=”wrap_content”
    android:layout_marginStart=”8dp”
    android:layout_marginTop=”16dp”
    android:layout_marginEnd=”8dp”
    android:padding=”8dp”
    android:text=”Dashboard”
    app:layout_constraintEnd_toEndOf=”parent”
    app:layout_constraintStart_toStartOf=”parent”
    />
Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Comment

Join our list

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Send this to a friend