940d6d395a
* cleanup warnings, reorganize some code * move ComposeAutoCompleteAdapter to compose package * composeOptions doesn't need to be a class member * add DraftsActivity and DraftsViewModel * drafts * remove unnecessary Unit in ComposeViewModel * add schema/25.json * fix db migration * drafts * cleanup code * fix compose activity rotation bug * fix media descriptions getting lost when restoring a draft * improve deleting drafts * fix ComposeActivityTest * improve draft layout for almost empty drafts * reformat code * show toast when opening reply to deleted toot * improve item_draft layout
95 lines
No EOL
4 KiB
XML
95 lines
No EOL
4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<androidx.constraintlayout.widget.ConstraintLayout 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="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginBottom="8dp"
|
|
android:background="?attr/selectableItemBackground"
|
|
android:paddingTop="4dp"
|
|
android:paddingBottom="4dp">
|
|
|
|
<TextView
|
|
android:id="@+id/draftSendingInfo"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:drawablePadding="4dp"
|
|
android:fontFamily="sans-serif-medium"
|
|
android:gravity="center_vertical"
|
|
android:text="@string/drafts_toot_failed_to_send"
|
|
android:textColor="@color/tusky_red"
|
|
android:textSize="?attr/status_text_medium"
|
|
app:drawableStartCompat="@drawable/ic_alert_circle"
|
|
app:drawableTint="@color/tusky_red"
|
|
app:layout_constraintEnd_toStartOf="@id/deleteButton"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<androidx.emoji.widget.EmojiTextView
|
|
android:id="@+id/contentWarning"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:fontFamily="sans-serif-medium"
|
|
android:textSize="?attr/status_text_medium"
|
|
app:layout_constraintEnd_toStartOf="@id/deleteButton"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/draftSendingInfo"
|
|
tools:text="Some content warning" />
|
|
|
|
<androidx.emoji.widget.EmojiTextView
|
|
android:id="@+id/content"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="4dp"
|
|
android:layout_marginEnd="8dp"
|
|
android:textSize="?attr/status_text_medium"
|
|
app:layout_constraintEnd_toStartOf="@id/deleteButton"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/contentWarning"
|
|
tools:text="Some toot content. May be very long." />
|
|
|
|
<ImageButton
|
|
android:id="@+id/deleteButton"
|
|
style="@style/TuskyImageButton"
|
|
android:layout_width="32dp"
|
|
android:layout_height="32dp"
|
|
android:layout_gravity="center_vertical"
|
|
android:layout_margin="12dp"
|
|
android:contentDescription="@string/action_delete"
|
|
android:padding="4dp"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent"
|
|
app:layout_constraintVertical_bias="0"
|
|
app:srcCompat="@drawable/ic_clear_24dp" />
|
|
|
|
<androidx.recyclerview.widget.RecyclerView
|
|
android:id="@+id/draftMediaPreview"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp"
|
|
android:layout_marginEnd="8dp"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintHorizontal_bias="0"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/content" />
|
|
|
|
<com.keylesspalace.tusky.components.compose.view.PollPreviewView
|
|
android:id="@+id/draftPoll"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginStart="8dp"
|
|
android:layout_marginTop="8dp"
|
|
android:minWidth="@dimen/poll_preview_min_width"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toBottomOf="@id/draftMediaPreview"
|
|
app:layout_goneMarginEnd="8dp" />
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |