Skip to content

Instantly share code, notes, and snippets.

@ns-github14
Last active December 5, 2020 09:59
Show Gist options
  • Save ns-github14/d9ca59d1df8253e0846edc3db6d17fa5 to your computer and use it in GitHub Desktop.
Save ns-github14/d9ca59d1df8253e0846edc3db6d17fa5 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<androidx.cardview.widget.CardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/card1"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="10dp"
app:cardElevation="8dp"
app:cardCornerRadius="5dp"
app:cardBackgroundColor="#E6E6E6"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/appbar">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:id="@+id/card_parent">
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginRight="10dp"
android:id="@+id/image"
android:background="#E6E6E6"
app:layout_constraintTop_toTopOf="@id/card_parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@id/card_parent"
app:layout_constraintEnd_toEndOf="@id/card_parent"
app:layout_constraintHorizontal_bias="0"
app:layout_constraintVertical_bias="0"
android:src="@mipmap/ic_doctor_foreground" />
<TextView
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="Name"
android:textColor="#000"
android:layout_marginLeft="10dp"
app:layout_constraintStart_toEndOf="@+id/image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/image"
app:layout_constraintBottom_toTopOf="@id/specialization"
android:textSize="18dp" />
<TextView
android:id="@+id/specialization"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="specialization"
android:layout_marginLeft="10dp"
android:textSize="13dp"
android:textColor="#000"
app:layout_constraintStart_toEndOf="@+id/image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/name"
app:layout_constraintBottom_toTopOf="@id/hospital" />
<TextView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:id="@+id/location"
android:hint="City, State"
android:layout_marginLeft="10dp"
app:layout_constraintStart_toEndOf="@id/image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/hospital"
app:layout_constraintBottom_toBottomOf="@id/image"/>
<TextView
android:id="@+id/hospital"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:hint="Hospital"
android:textSize="15dp"
android:layout_marginLeft="10dp"
android:textColor="#000"
app:layout_constraintStart_toEndOf="@+id/image"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/specialization"
app:layout_constraintBottom_toTopOf="@id/location" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.cardview.widget.CardView>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment