Skip to content

Instantly share code, notes, and snippets.

@ShaishavGandhi
Last active November 5, 2017 01:00
Show Gist options
  • Save ShaishavGandhi/2d473bdb614845c1f99fb461193e3ed1 to your computer and use it in GitHub Desktop.
Save ShaishavGandhi/2d473bdb614845c1f99fb461193e3ed1 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:paddingTop="8dp"
android:paddingBottom="8dp"
xmlns:tools="http://schemas.android.com/tools">
<TextView
android:id="@+id/userName"
android:layout_width="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
tools:text="thesquarecomics"
android:layout_marginStart="16dp"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/image"
android:layout_width="match_parent"
android:layout_marginTop="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/userName"
android:scaleType="fitCenter"
tools:src="@android:drawable/sym_call_missed"
android:layout_height="wrap_content" />
<CheckBox
android:id="@+id/likeIcon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintLeft_toLeftOf="parent"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
android:clickable="true"
android:button="@null"
android:stateListAnimator="@animator/scale"
android:checked="false"
app:layout_constraintTop_toBottomOf="@+id/image"
android:background="@drawable/like_icon"
android:focusable="true" />
<TextView
android:id="@+id/likeCount"
android:layout_width="wrap_content"
tools:text="861 likes"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/likeIcon"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/caption"
android:layout_width="wrap_content"
tools:text="Special"
android:layout_marginStart="16dp"
android:layout_marginTop="8dp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/likeCount"
android:layout_height="wrap_content" />
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment