<?xml version="1.0" encoding="utf-8"?><!--
  ~ Copyright (c) 2020 Threema GmbH
  ~ All rights reserved.
  -->
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginRight="@dimen/tooltip_layout_margin_right"
    android:layout_marginBottom="8dp"
    android:layout_marginLeft="@dimen/tooltip_layout_margin_left"
    android:layout_marginTop="2dp"
    android:elevation="0dp"
    android:background="@android:color/transparent">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="12dp"
        android:layout_marginBottom="12dp"
        app:cardBackgroundColor="?attr/colorTertiaryContainer"
        app:cardElevation="6dp"
        app:contentPaddingBottom="6dp"
        app:contentPaddingLeft="12dp"
        app:contentPaddingRight="12dp"
        app:contentPaddingTop="6dp"
        app:strokeWidth="0dp">

        <LinearLayout
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:orientation="horizontal">

            <ImageView
                android:id="@id/icon"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="left|center_vertical"
                android:layout_marginRight="8dp"
                app:srcCompat="@drawable/ic_badge_work_24dp" />

            <ch.threema.app.emojis.EmojiTextView
                android:id="@+id/label"
                style="@style/Threema.TextAppearance.BodyMedium"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_gravity="left|center_vertical"
                android:layout_weight="1"
                android:textColor="?colorOnTertiaryContainer"
                android:textSize="@dimen/tooltip_text_size" />

            <com.google.android.material.button.MaterialButton
                style="@style/Threema.MaterialButton.Minimal"
                android:id="@+id/close_button"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="right|center_vertical"
                android:layout_marginLeft="4dp"
                android:layout_marginTop="1dp"
                android:contentDescription="@string/close"
                app:icon="@drawable/ic_close"
                app:iconTint="?colorOnTertiaryContainer" />

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

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/arrow_top_left"
        android:layout_width="@dimen/identity_popup_arrow_width"
        android:layout_height="@dimen/identity_popup_arrow_height"
        android:layout_gravity="left|top"
        android:layout_marginLeft="@dimen/tooltip_popup_arrow_inset"
        android:importantForAccessibility="no"
        android:visibility="gone"
        app:cardBackgroundColor="?attr/colorTertiaryContainer"
        app:cardElevation="6dp"
        app:shapeAppearance="@style/Threema.ShapeAppearance.Arrow.Up"
        app:strokeWidth="0dp" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/arrow_top_right"
        android:layout_width="@dimen/identity_popup_arrow_width"
        android:layout_height="@dimen/identity_popup_arrow_height"
        android:layout_gravity="right|top"
        android:layout_marginRight="@dimen/tooltip_popup_arrow_inset"
        android:importantForAccessibility="no"
        android:visibility="gone"
        app:cardBackgroundColor="?attr/colorTertiaryContainer"
        app:cardElevation="6dp"
        app:shapeAppearance="@style/Threema.ShapeAppearance.Arrow.Up"
        app:strokeWidth="0dp" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/arrow_bottom_left"
        android:layout_width="@dimen/identity_popup_arrow_width"
        android:layout_height="@dimen/identity_popup_arrow_height"
        android:layout_gravity="left|bottom"
        android:layout_marginLeft="@dimen/tooltip_popup_arrow_inset"
        android:importantForAccessibility="no"
        android:visibility="gone"
        app:cardBackgroundColor="?attr/colorTertiaryContainer"
        app:cardElevation="6dp"
        app:shapeAppearance="@style/Threema.ShapeAppearance.Arrow.Down"
        app:strokeWidth="0dp" />

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/arrow_bottom_right"
        android:layout_width="@dimen/identity_popup_arrow_width"
        android:layout_height="@dimen/identity_popup_arrow_height"
        android:layout_gravity="right|bottom"
        android:layout_marginRight="@dimen/tooltip_popup_arrow_inset"
        android:importantForAccessibility="no"
        android:visibility="gone"
        app:cardBackgroundColor="?attr/colorTertiaryContainer"
        app:cardElevation="6dp"
        app:shapeAppearance="@style/Threema.ShapeAppearance.Arrow.Down"
        app:strokeWidth="0dp" />

</FrameLayout>
