Skip to content

Instantly share code, notes, and snippets.

@guuilp
Created June 28, 2018 02:18
Show Gist options
  • Save guuilp/055f7399488f1b090301a07e9067dcff to your computer and use it in GitHub Desktop.
Save guuilp/055f7399488f1b090301a07e9067dcff to your computer and use it in GitHub Desktop.
Constraint Layout DOJO - Solution (STEP 2)
<ImageView
android:id="@+id/comment"
android:layout_width="21dp"
android:layout_height="21dp"
android:layout_marginTop="12dp"
android:src="@drawable/ic_comment"
android:tint="@color/gray"
app:layout_constraintTop_toBottomOf="@+id/text"
app:layout_constraintLeft_toLeftOf="@+id/text"
app:layout_constraintRight_toLeftOf="@id/retweet"
app:layout_constraintHorizontal_chainStyle="spread_inside"/>
<ImageView
android:id="@+id/favorite"
android:layout_width="21dp"
android:layout_height="21dp"
android:src="@drawable/ic_favorite"
android:tint="@color/gray"
app:layout_constraintTop_toTopOf="@+id/comment"
app:layout_constraintLeft_toRightOf="@+id/retweet"
app:layout_constraintRight_toLeftOf="@+id/share"/>
<ImageView
android:id="@+id/retweet"
android:layout_width="21dp"
android:layout_height="21dp"
android:src="@drawable/ic_retweet"
android:tint="@color/gray"
app:layout_constraintTop_toTopOf="@+id/comment"
app:layout_constraintLeft_toRightOf="@+id/comment"
app:layout_constraintRight_toLeftOf="@+id/favorite"/>
<ImageView
android:id="@+id/share"
android:layout_width="21dp"
android:layout_height="21dp"
android:src="@drawable/ic_share"
android:tint="@color/gray"
app:layout_constraintTop_toTopOf="@+id/comment"
app:layout_constraintLeft_toRightOf="@+id/favorite"
app:layout_constraintRight_toRightOf="@+id/text"/>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment