<?xml version="1.0" encoding="utf-8"?>

<merge
    xmlns:android="http://schemas.android.com/apk/res/android"
    tools:viewBindingIgnore="true"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools">

  <com.google.android.material.card.MaterialCardView
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_margin="8dp"
      android:clipChildren="false"
      android:clipToPadding="false"
      app:strokeColor="@color/signal_colorOutline_38"
      app:strokeWidth="1dp"
      app:cardBackgroundColor="@color/signal_colorBackground"
      app:cardCornerRadius="12dp"
      app:cardElevation="0dp"
      app:cardPreventCornerOverlap="false"
      app:cardUseCompatPadding="true"
      app:contentPadding="0dp">

    <ScrollView
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

      <androidx.constraintlayout.widget.ConstraintLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:clickable="true"
          android:focusable="true"
          android:paddingStart="8dp"
          android:paddingTop="16dp"
          android:paddingEnd="8dp"
          android:paddingBottom="8dp">

        <com.airbnb.lottie.LottieAnimationView
            android:id="@+id/basic_megaphone_image"
            android:layout_width="64dp"
            android:layout_height="64dp"
            android:layout_marginStart="8dp"
            android:scaleType="centerInside"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent"
            tools:src="@tools:sample/avatars" />

        <org.thoughtcrime.securesms.components.emoji.EmojiTextView
            android:id="@+id/basic_megaphone_title"
            style="@style/Signal.Text.BodyLarge"
            android:textColor="@color/signal_colorOnSurface"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="12dp"
            android:layout_marginEnd="8dp"
            android:fontFamily="sans-serif-medium"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/basic_megaphone_image"
            app:layout_constraintTop_toTopOf="@id/basic_megaphone_image"
            tools:text="Avengers HQ Destroyed!" />

        <org.thoughtcrime.securesms.components.emoji.EmojiTextView
            android:id="@+id/basic_megaphone_body"
            style="@style/Signal.Text.BodyMedium"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:textColor="@color/megaphone_body_text_color"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="@id/basic_megaphone_title"
            app:layout_constraintTop_toBottomOf="@id/basic_megaphone_title"
            tools:text="Where was the 'hero' Spider-Man during the battle?" />

        <androidx.constraintlayout.widget.Barrier
            android:id="@+id/basic_megaphone_content_barrier"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            app:barrierDirection="bottom"
            app:constraint_referenced_ids="basic_megaphone_image,basic_megaphone_body,basic_megaphone_title" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/basic_megaphone_action"
            style="@style/Signal.Widget.Button.Large.Secondary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:textAllCaps="false"
            android:textColor="@color/signal_colorPrimary"
            app:layout_constrainedWidth="true"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toEndOf="@id/basic_megaphone_secondary"
            app:layout_constraintTop_toBottomOf="@id/basic_megaphone_content_barrier"
            app:layout_constraintWidth_max="wrap"
            app:layout_constraintWidth_percent="0.5"
            tools:text="*sigh*"
            tools:visibility="visible" />

        <com.google.android.material.button.MaterialButton
            android:id="@+id/basic_megaphone_secondary"
            style="@style/Signal.Widget.Button.Large.Secondary"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_marginTop="4dp"
            android:text="@string/Megaphones_remind_me_later"
            android:textAllCaps="false"
            android:textColor="@color/signal_colorPrimary"
            app:layout_constrainedWidth="true"
            app:layout_constraintEnd_toStartOf="@id/basic_megaphone_action"
            app:layout_constraintHorizontal_bias="1.0"
            app:layout_constraintHorizontal_chainStyle="packed"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@id/basic_megaphone_content_barrier"
            app:layout_constraintWidth_max="wrap"
            app:layout_constraintWidth_percent="0.5"
            tools:visibility="visible" />

      </androidx.constraintlayout.widget.ConstraintLayout>

    </ScrollView>

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

</merge>