Skip to content

Instantly share code, notes, and snippets.

@guuilp
Created June 28, 2018 02:22
Show Gist options
  • Save guuilp/060885528977087f47983a9120bedac9 to your computer and use it in GitHub Desktop.
Save guuilp/060885528977087f47983a9120bedac9 to your computer and use it in GitHub Desktop.
Constraint Layout DOJO - Solution (STEP 3)
<android.support.constraint.Group
android:id="@+id/group_retweet"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:constraint_referenced_ids="retweet_top, retweet_user"/>
<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_toBottomOf="@+id/retweet_top"
app:layout_constraintLeft_toLeftOf="parent"/>
<ImageView
android:id="@+id/retweet_top"
android:layout_width="15dp"
android:layout_height="15dp"
android:src="@drawable/ic_retweet"
android:tint="@color/gray"
app:layout_constraintTop_toTopOf="@+id/retweet_user"
app:layout_constraintBottom_toBottomOf="@+id/retweet_user"
app:layout_constraintRight_toRightOf="@id/profile_image"/>
<TextView
android:id="@+id/retweet_user"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:text="Nicolas Roard retweetou"
android:textColor="@color/gray"
app:layout_constraintTop_toTopOf="@id/retweet_top"
app:layout_constraintLeft_toLeftOf="@+id/username"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment