Untitled

mail@pastecode.io avatar
unknown
plain_text
4 years ago
9.0 kB
3
Indexable
Never
<?xml version="1.0" encoding="utf-8"?>
<layout 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">

    <data>

        <variable
            name="model"
            type="com.kitabisa.android.tawasul.common.TasawulItemViewModel" />

        <import type="android.view.View" />
    </data>

    <com.google.android.material.card.MaterialCardView
        android:layout_width="254dp"
        android:layout_height="190dp"
        app:cardCornerRadius="4dp"
        app:cardElevation="4dp"
        app:strokeColor="@color/black_10"
        app:strokeWidth="0.5dp">

        <androidx.constraintlayout.widget.ConstraintLayout
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/bg_border_rectangle_grey"
            android:paddingStart="16dp"
            android:paddingTop="16dp"
            android:paddingEnd="16dp">

            <androidx.appcompat.widget.AppCompatImageView
                android:id="@+id/imageViewFundraiserImage"
                android:layout_width="30dp"
                android:layout_height="30dp"
                app:avatarUrl="@{model.avatar}"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent"
                tools:src="@drawable/ic_profile_picture" />

            <TextView
                android:id="@+id/textViewDonaturName"
                style="@style/Font.Small.SemiBold"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_marginStart="16dp"
                android:text="@{model.fullName}"
                app:layout_constraintBottom_toTopOf="@+id/textViewCampaignName"
                app:layout_constraintStart_toEndOf="@+id/imageViewFundraiserImage"
                app:layout_constraintTop_toTopOf="@+id/imageViewFundraiserImage"
                app:layout_constraintVertical_chainStyle="packed"
                tools:text="Afgan" />

            <androidx.appcompat.widget.AppCompatImageButton
                android:id="@+id/image3dots"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="@null"
                android:padding="2dp"
                android:src="@drawable/ic_3_dots"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintTop_toTopOf="parent" />

            <TextView
                android:id="@+id/textViewCampaignName"
                style="@style/Font.XS.Blue"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:singleLine="true"
                android:text="@{model.campaignTitle}"
                app:layout_constraintBottom_toBottomOf="@id/imageViewFundraiserImage"
                app:layout_constraintEnd_toStartOf="@id/textViewTime"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toStartOf="@id/textViewDonaturName"
                app:layout_constraintTop_toBottomOf="@id/textViewDonaturName"
                tools:text="Bantu adelio lawan kan penyakitnya" />

            <TextView
                android:id="@+id/textViewTime"
                style="@style/Font.XS"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:drawablePadding="2dp"
                android:ellipsize="end"
                android:gravity="start"
                android:paddingStart="2dp"
                android:singleLine="true"
                app:drawableStartCompat="@drawable/ic_dot"
                app:layout_constraintBottom_toBottomOf="@+id/imageViewFundraiserImage"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toEndOf="@+id/textViewCampaignName"
                app:layout_constraintTop_toBottomOf="@+id/textViewDonaturName"
                tools:text="5 menit" />

            <ImageView
                android:id="@+id/imageViewVerified"
                android:layout_width="12dp"
                android:layout_height="12dp"
                android:layout_marginStart="4dp"
                android:src="@drawable/ic_verified_badge_small"
                android:visibility="gone"
                app:layout_constraintBottom_toBottomOf="@+id/textViewDonaturName"
                app:layout_constraintStart_toEndOf="@+id/textViewDonaturName"
                app:layout_constraintTop_toTopOf="@+id/textViewDonaturName" />

            <TextView
                android:id="@+id/textViewDoa"
                style="@style/Font.Small"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:ellipsize="end"
                android:lines="2"
                android:text="@{model.dua}"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/imageViewFundraiserImage"
                tools:text="Semoga allah swt memudahkan semua usaha kita meraih hal yang..." />

            <TextView
                android:id="@+id/textViewSeeDoa"
                style="@style/Font.Small.Grey"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:ellipsize="end"
                android:text="Lihat Selengkapnya"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/textViewDoa"
                tools:text="Lihat Selengkapnya" />

            <TextView
                android:id="@+id/textViewLikerSpan"
                style="@style/Font.XS"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_marginTop="12dp"
                android:ellipsize="end"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintHorizontal_bias="0.5"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@+id/textViewSeeDoa"
                tools:text="Kamu dan 28 lainnya mengaminkan doa ini" />

            <View
                android:id="@+id/lines"
                android:layout_width="match_parent"
                android:layout_height="1dp"
                android:layout_marginTop="12dp"
                android:background="@color/pale_grey"
                app:layout_constraintTop_toBottomOf="@+id/textViewLikerSpan"
                tools:layout_editor_absoluteX="16dp" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/buttonAaamiin"
                style="@style/AppTheme.PrimaryButton.TextButton.Grey.Small"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/campaign_detail_tawasul_aamiin_button"
                app:icon="@drawable/ic_heart_pink_small"
                app:iconGravity="textStart"
                app:iconPadding="@dimen/basic_padding"
                app:iconTint="@color/brown_grey"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toStartOf="@id/buttonShare"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toBottomOf="@id/lines" />

            <com.google.android.material.button.MaterialButton
                android:id="@+id/buttonShare"
                style="@style/AppTheme.PrimaryButton.TextButton.Grey.Small"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:text="@string/campaign_detail_tawasul_share_button"
                app:icon="@drawable/ic_share_small"
                app:iconGravity="textStart"
                app:iconPadding="@dimen/basic_padding"
                app:iconTint="@color/brown_grey"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintEnd_toEndOf="parent"
                app:layout_constraintStart_toEndOf="@id/buttonAaamiin"
                app:layout_constraintTop_toBottomOf="@id/lines" />

        </androidx.constraintlayout.widget.ConstraintLayout>

    </com.google.android.material.card.MaterialCardView>

</layout>