Skip to content

Instantly share code, notes, and snippets.

@husaynhakeem
Created September 27, 2017 13:42
Show Gist options
  • Save husaynhakeem/0ff484afa4ac252219369ad29513211f to your computer and use it in GitHub Desktop.
Save husaynhakeem/0ff484afa4ac252219369ad29513211f to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<android.support.v7.widget.CardView 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="wrap_content"
android:layout_margin="2dp"
app:cardCornerRadius="@dimen/cardview_default_radius"
app:cardElevation="@dimen/cardview_default_elevation"
app:cardUseCompatPadding="true">
<android.support.constraint.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="16dp"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:paddingTop="16dp">
<TextView
android:id="@+id/tv_pokemon_id"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/white"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="#001"/>
<ImageView
android:id="@+id/iv_pokemon"
android:layout_width="70dp"
android:layout_height="70dp"
android:layout_marginTop="8dp"
android:contentDescription="@string/iv_pokemon_cd"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tv_pokemon_id"
tools:src="@drawable/pokedex"/>
<TextView
android:id="@+id/tv_pokemon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:textColor="@color/white"
app:layout_constraintLeft_toRightOf="parent"
app:layout_constraintRight_toLeftOf="parent"
app:layout_constraintTop_toBottomOf="@+id/iv_pokemon"
tools:text="Bulbasaur"/>
</android.support.constraint.ConstraintLayout>
</android.support.v7.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment