Skip to content

Instantly share code, notes, and snippets.

@guuilp
Created June 28, 2018 02:16
Embed
What would you like to do?
Constraint Layout DOJO - Solution (STEP 1)
<de.hdodenhof.circleimageview.CircleImageView
android:id="@+id/profile_image"
android:layout_width="50dp"
android:layout_height="50dp"
android:layout_marginTop="8dp"
android:src="@drawable/profile_image"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"/>
<TextView
android:id="@+id/text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="4dp"
android:layout_marginEnd="8dp"
tools:text="You found a bug in Android/Jetpacksuetracker.google.com so the teams know about it. Complaining on Twitter won't get that bug fixed."
android:textColor="@color/white"
app:layout_constraintTop_toBottomOf="@+id/username"
app:layout_constraintLeft_toLeftOf="@+id/username"
app:layout_constraintRight_toRightOf="parent"/>
<TextView
android:id="@+id/username"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="12dp"
tools:text="Florina Muntenescu"
android:textColor="@color/white"
android:textStyle="bold"
app:layout_constraintTop_toTopOf="@+id/profile_image"
app:layout_constraintLeft_toRightOf="@+id/profile_image"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment