Skip to content

Instantly share code, notes, and snippets.

@carolinemusyoka
Created September 10, 2020 01:53
Show Gist options
  • Save carolinemusyoka/0e2ae1d3a9b85202d3b3ffed80483ebe to your computer and use it in GitHub Desktop.
Save carolinemusyoka/0e2ae1d3a9b85202d3b3ffed80483ebe to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.cardview.widget.CardView
android:id="@+id/card_view"
android:layout_width="150dp"
android:layout_height="230dp"
android:layout_gravity="center"
android:layout_marginLeft="15dp"
android:layout_marginTop="15dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="15dp"
app:cardElevation="5dp"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintVertical_bias="0.0"
card_view:cardCornerRadius="32dp"
card_view:layout_constraintBottom_toBottomOf="parent"
card_view:layout_constraintEnd_toEndOf="parent"
card_view:layout_constraintStart_toStartOf="parent"
card_view:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/superheroImage"
android:layout_width="150dp"
android:layout_height="120dp"
android:layout_marginTop="10dp"
card_view:srcCompat="@android:mipmap/sym_def_app_icon" />
<TextView
android:id="@+id/superheroName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="30dp"
android:layout_marginTop="160dp"
android:text="TextView"
android:textSize="18sp" />
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment