Skip to content

Instantly share code, notes, and snippets.

@illuzor
Last active September 29, 2018 18:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save illuzor/859449a6f988d9121487a4223c115c27 to your computer and use it in GitHub Desktop.
Save illuzor/859449a6f988d9121487a4223c115c27 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<com.illuzor.lesson.wallpapers.ui.SquareConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="0dp">
<ImageView
android:id="@+id/iv_preview"
android:layout_width="0dp"
android:layout_height="0dp"
android:scaleType="centerCrop"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<View
android:layout_width="0dp"
android:layout_height="0dp"
android:alpha="0.8"
android:background="@color/colorPrimaryDark"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/tv_title" />
<TextView
android:id="@+id/tv_title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:gravity="center"
android:textColor="@color/blackTextColor"
android:textSize="16sp"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:text="Category Name" />
</com.illuzor.lesson.wallpapers.ui.SquareConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment