<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
	xmlns:app="http://schemas.android.com/apk/res-auto"
	android:id="@+id/control_panel"
	android:layout_width="match_parent"
	android:layout_height="wrap_content"
	android:background="@android:color/transparent">

	<View
		android:id="@+id/divider1"
		android:layout_width="match_parent"
		android:layout_height="1dp"
		android:background="#03777777"
		android:importantForAccessibility="no" />

	<View
		android:id="@+id/divider2"
		android:layout_marginTop="1dp"
		android:layout_width="match_parent"
		android:layout_height="1dp"
		android:background="#12777777"
		android:importantForAccessibility="no" />

	<View
		android:id="@+id/divider3"
		android:layout_marginTop="2dp"
		android:layout_width="match_parent"
		android:layout_height="1dp"
		android:background="#40777777"
		android:importantForAccessibility="no" />

	<FrameLayout
		android:layout_width="match_parent"
		android:layout_height="match_parent"
		android:layout_marginTop="@dimen/media_attach_control_panel_shadow_size"
		android:background="?attr/background_secondary"
		android:importantForAccessibility="no"
		android:clickable="false">

		<HorizontalScrollView
			android:id="@+id/attach_panel"
			android:layout_width="wrap_content"
			android:layout_height="match_parent"
			android:layout_gravity="center_horizontal"
			android:fillViewport="true"
			android:clickable="false"
			android:importantForAccessibility="no"
			android:scrollbars="none">

			<LinearLayout
				android:id="@+id/attach_options_container"
				android:layout_width="wrap_content"
				android:layout_height="match_parent"
				android:paddingLeft="2dp"
				android:paddingRight="2dp"
				android:orientation="horizontal"
				android:elevation="4dp"
				android:importantForAccessibility="no"
				android:visibility="visible">

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_gallery"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:labelIcon="@drawable/ic_image_outline"
					app:fillColor="@color/material_teal"
					app:foregroundColor="@color/material_teal"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelText="@string/media" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_file"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:labelIcon="@drawable/ic_file_outline"
					app:fillColor="@color/material_indigo"
					app:foregroundColor="@color/material_indigo"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelText="@string/attach_document" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_location"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:labelIcon="@drawable/ic_map_marker_outline"
					app:fillColor="@color/material_purple"
					app:foregroundColor="@color/material_deep_purple"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelText="@string/attach_location" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_poll"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:labelIcon="@drawable/ic_outline_rule"
					app:foregroundColor="@color/material_red"
					app:fillColor="@color/material_red"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelText="@string/attach_ballot" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_contact"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:labelIcon="@drawable/ic_person_outline"
					app:fillColor="@color/material_orange"
					app:foregroundColor="@color/material_orange"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelText="@string/mime_contact" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_drawing"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:fillColor="@color/material_amber"
					app:foregroundColor="@color/material_amber"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelIcon="@drawable/ic_drawing"
					app:labelText="@string/drawing" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_qr_code"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:fillColor="@color/material_green"
					app:foregroundColor="@color/material_green"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelIcon="@drawable/ic_qr_code"
					app:labelText="@string/qr_code" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/attach_system_camera"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:layout_gravity="center_vertical"
					app:fillColor="@color/material_brown"
					app:foregroundColor="@color/material_brown"
					app:fillColorAlpha="@integer/button_alpha"
					app:labelIcon="@drawable/ic_camera_outline"
					app:labelText="@string/attach_camera" />

			</LinearLayout>

		</HorizontalScrollView>

		<ImageView
			android:id="@+id/more_arrow"
			android:layout_width="48dp"
			android:layout_height="48dp"
			app:srcCompat="@drawable/ic_arrow_forward_outline"
			android:layout_gravity="center_vertical|right"
			android:importantForAccessibility="no"
			android:clickable="true"
			android:visibility="gone"/>

		<androidx.constraintlayout.widget.ConstraintLayout
			android:id="@+id/send_panel"
			android:layout_width="match_parent"
			android:layout_height="match_parent"
			android:importantForAccessibility="no"
			android:visibility="gone">

			<LinearLayout
				android:id="@+id/control_buttons"
				android:layout_width="wrap_content"
				android:layout_height="wrap_content"
				android:layout_gravity="left"
				android:orientation="horizontal"
				android:importantForAccessibility="no"
				android:elevation="4dp"
				app:layout_constraintBottom_toBottomOf="parent"
				app:layout_constraintEnd_toEndOf="parent"
				app:layout_constraintStart_toStartOf="parent"
				app:layout_constraintTop_toTopOf="parent">

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/cancel"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:clickable="true"
					android:focusable="true"
					app:fillColor="@color/media_attach_button_background_default"
					app:labelIcon="@drawable/ic_close"
					app:labelText="@string/cancel" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/edit"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:clickable="true"
					android:focusable="true"
					app:fillColor="@color/media_attach_button_background_default"
					app:labelIcon="@drawable/ic_pencil_outline"
					app:labelText="@string/edit" />

				<ch.threema.app.mediaattacher.ControlPanelButton
					android:id="@+id/send"
					android:layout_width="@dimen/media_attach_button_width"
					android:layout_height="@dimen/media_attach_button_height"
					android:clickable="true"
					android:focusable="true"
					app:labelIcon="@drawable/ic_send_outline"
					app:labelText="@string/send"
					app:fillColor="?attr/colorAccent"
					app:fillColorAlpha="@integer/chip_alpha"
					app:foregroundColor="?attr/colorAccent" />

			</LinearLayout>

			<Button
				android:id="@+id/select_counter_button"
				android:layout_width="32dp"
				android:layout_height="32dp"
				android:textSize="12sp"
				android:translationX="10dp"
				android:layout_marginTop="4dp"
				android:singleLine="true"
				android:padding="0dp"
				app:layout_constraintEnd_toEndOf="@+id/control_buttons"
				app:layout_constraintHorizontal_bias="1.0"
				app:layout_constraintStart_toStartOf="@+id/control_buttons"
				app:layout_constraintTop_toTopOf="parent"
				android:background="@drawable/selector_media_send_counterbubble"
				android:textAppearance="@style/MediaAttachButtonLabel" />

		</androidx.constraintlayout.widget.ConstraintLayout>

	</FrameLayout>

</FrameLayout>
