fedilab-Android-App/app/src/main/res/layout/compose_attachment_item.xml

84 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.material.card.MaterialCardView 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"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginVertical="6dp"
android:layout_marginStart="6dp"
app:cardElevation="2dp">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/preview"
android:layout_width="0dp"
android:layout_height="100dp"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:src="@tools:sample/backgrounds/scenic" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_play"
style="@style/Widget.AppCompat.Button.Borderless"
android:layout_width="48dp"
android:layout_height="48dp"
android:adjustViewBounds="true"
android:padding="6dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_compose_attachment_play"
app:layout_constraintBottom_toBottomOf="@id/preview"
app:layout_constraintEnd_toEndOf="@id/preview"
app:layout_constraintStart_toStartOf="@id/preview"
app:layout_constraintTop_toTopOf="@id/preview" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_remove"
android:layout_width="36dp"
android:layout_height="36dp"
android:adjustViewBounds="true"
android:backgroundTint="@color/errorColor"
android:src="@drawable/ic_compose_attachment_remove"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_order_up"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="48dp"
android:layout_height="48dp"
android:adjustViewBounds="true"
android:src="@drawable/ic_compose_attachment_order_up"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/preview" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_description"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="48dp"
android:layout_height="48dp"
android:adjustViewBounds="true"
android:src="@drawable/ic_compose_attachment_description"
app:layout_constraintEnd_toStartOf="@id/button_order_down"
app:layout_constraintStart_toEndOf="@id/button_order_up"
app:layout_constraintTop_toBottomOf="@id/preview" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/button_order_down"
style="@style/Widget.AppCompat.Button.Borderless.Colored"
android:layout_width="48dp"
android:layout_height="48dp"
android:adjustViewBounds="true"
android:src="@drawable/ic_compose_attachment_order_down"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/preview" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>