Skip to content

Instantly share code, notes, and snippets.

@Anthonyeef
Created September 14, 2018 09:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Anthonyeef/2fd1646836f7810569c504de5d56029a to your computer and use it in GitHub Desktop.
Save Anthonyeef/2fd1646836f7810569c504de5d56029a to your computer and use it in GitHub Desktop.
A demo for Telegram group question
<?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="match_parent"
android:layout_height="wrap_content"
android:padding="16dp"
tools:context=".MainActivity">
<ImageView
android:id="@+id/img"
android:layout_width="40dp"
android:layout_height="60dp"
android:src="@color/colorPrimaryDark"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="This is text 1"
android:layout_marginLeft="16dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/img"
/>
<Space
android:id="@+id/dummy"
android:layout_width="wrap_content"
android:layout_height="15dp"
app:layout_constraintBottom_toBottomOf="@id/img"
app:layout_constraintStart_toEndOf="@id/img"
/>
<TextView
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_marginLeft="16dp"
android:text="This is text 2 \n with new line"
app:layout_constraintTop_toTopOf="@id/dummy"
app:layout_constraintStart_toEndOf="@id/img"
/>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment