Skip to content

Instantly share code, notes, and snippets.

@nutchy
Created October 16, 2017 04:10
Show Gist options
  • Save nutchy/7256bca80d10cde7cb5b09a7194af728 to your computer and use it in GitHub Desktop.
Save nutchy/7256bca80d10cde7cb5b09a7194af728 to your computer and use it in GitHub Desktop.
[MyLazyInstagram] - post_item.xml
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:layout_editor_absoluteY="81dp"
tools:layout_editor_absoluteX="0dp">
<ImageView
android:id="@+id/imageView"
android:layout_width="0dp"
android:layout_height="0dp"
android:adjustViewBounds="false"
android:background="#FFF"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="H,1:1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:layout_margin="0.5dp"/>
<LinearLayout
android:layout_width="0dp"
android:layout_height="30dp"
android:background="#96000000"
app:layout_constraintLeft_toLeftOf="@+id/imageView"
app:layout_constraintBottom_toBottomOf="@+id/imageView"
app:layout_constraintRight_toRightOf="@id/imageView">
<ImageView
android:id="@+id/iconLove"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_weight="1"
android:scaleY="0.9"
android:scaleX="0.9"
app:srcCompat="@mipmap/ic_love"
/>
<TextView
android:id="@+id/tvLike"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:text="0"
android:textAlignment="center"
android:textColor="#FFF"
android:textSize="14dp" />
<ImageView
android:id="@+id/iconComment"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_weight="1"
android:scaleY="0.9"
android:scaleX="0.9"
app:srcCompat="@mipmap/ic_comment"
/>
<TextView
android:id="@+id/tvComment"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_weight="3"
android:text="0"
android:textColor="#FFF"
android:textAlignment="center"
android:textSize="14dp" />
</LinearLayout>
</android.support.constraint.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment