diff options
author | Thomas <tschneider.ac@gmail.com> | 2023-08-16 14:55:42 +0200 |
---|---|---|
committer | Thomas <tschneider.ac@gmail.com> | 2023-08-16 14:55:42 +0200 |
commit | 28ee0550ae20a7d717603d3d9bd54f89eb443438 (patch) | |
tree | ced17c40e83175333138b7d3ef3b76c6705452ae /app/src/main/res | |
parent | d299c7020d5dd0eaa16d93560deebf92e1a8112e (diff) |
Make buttons still visible when composing with media
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layouts/mastodon/layout/drawer_status_compose.xml | 88 |
1 files changed, 49 insertions, 39 deletions
diff --git a/app/src/main/res/layouts/mastodon/layout/drawer_status_compose.xml b/app/src/main/res/layouts/mastodon/layout/drawer_status_compose.xml index 1c54a62f6..6aae2c093 100644 --- a/app/src/main/res/layouts/mastodon/layout/drawer_status_compose.xml +++ b/app/src/main/res/layouts/mastodon/layout/drawer_status_compose.xml @@ -138,44 +138,14 @@ app:layout_constraintTop_toBottomOf="@id/button_maths_composer" tools:visibility="visible" /> - <com.google.android.material.checkbox.MaterialCheckBox - android:id="@+id/sensitive_media" - android:layout_width="0dp" - android:layout_height="wrap_content" - android:layout_marginHorizontal="6dp" - android:layout_marginTop="6dp" - android:minHeight="36dp" - android:text="@string/toot_sensitive" - android:visibility="gone" - app:layout_constraintEnd_toEndOf="parent" - app:layout_constraintHorizontal_bias="0" - app:layout_constraintStart_toStartOf="parent" - app:layout_constraintTop_toBottomOf="@id/content" - app:layout_constraintWidth_default="wrap" /> - - <HorizontalScrollView - android:id="@+id/attachments_list_container" - android:layout_width="match_parent" - android:layout_height="wrap_content" - android:layout_marginHorizontal="6dp" - app:layout_constraintTop_toBottomOf="@id/sensitive_media"> - - <androidx.appcompat.widget.LinearLayoutCompat - android:id="@+id/attachments_list" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:clipToPadding="false" - android:paddingEnd="6dp" - tools:ignore="RtlSymmetry" /> - </HorizontalScrollView> <com.google.android.material.divider.MaterialDivider android:id="@+id/text_area_divider" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_marginHorizontal="6dp" - app:layout_constraintTop_toBottomOf="@id/attachments_list_container" /> + app:layout_constraintTop_toBottomOf="@id/content" /> <com.google.android.material.button.MaterialButton android:id="@+id/button_attach" @@ -185,7 +155,7 @@ android:layout_marginVertical="6dp" android:layout_marginStart="6dp" app:icon="@drawable/ic_compose_attach" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toBottomOf="@id/text_area_divider" /> @@ -197,7 +167,7 @@ android:layout_marginVertical="6dp" android:checkable="true" app:icon="@drawable/ic_compose_sensitive" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintStart_toEndOf="@id/button_attach" app:layout_constraintTop_toBottomOf="@id/text_area_divider" app:toggleCheckedStateOnClick="true" /> @@ -211,7 +181,7 @@ app:icon="@drawable/ic_compose_visibility_public" app:iconGravity="textStart" app:iconPadding="0dp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintStart_toEndOf="@id/button_sensitive" app:layout_constraintTop_toBottomOf="@id/text_area_divider" /> @@ -223,7 +193,7 @@ android:layout_marginVertical="6dp" android:fontFamily="monospace" android:minWidth="72dp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintStart_toEndOf="@id/button_visibility" app:layout_constraintTop_toBottomOf="@id/text_area_divider" tools:text="EN" /> @@ -246,7 +216,7 @@ style="@style/Widget.AppCompat.ProgressBar.Horizontal" android:layout_width="48dp" android:layout_height="12dp" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintEnd_toStartOf="@id/button_post" app:layout_constraintStart_toEndOf="@id/button_language" app:layout_constraintTop_toBottomOf="@id/character_count" /> @@ -259,7 +229,7 @@ android:layout_marginVertical="6dp" android:layout_marginEnd="6dp" app:icon="@drawable/ic_compose_post" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintTop_toBottomOf="@id/text_area_divider" /> @@ -273,7 +243,7 @@ app:constraint_referenced_ids="button_attach_image,button_attach_audio,button_attach_video,button_close_attachment_panel,button_poll,button_attach_manual" app:flow_maxElementsWrap="3" app:flow_wrapMode="aligned" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/button_attach" app:layout_constraintStart_toStartOf="parent" /> <com.google.android.material.button.MaterialButton @@ -327,7 +297,7 @@ android:orientation="vertical" android:padding="6dp" android:visibility="gone" - app:layout_constraintBottom_toBottomOf="parent" + app:layout_constraintBottom_toBottomOf="@id/action_buttons_barrier" app:layout_constraintTop_toTopOf="parent" app:layout_constraintVertical_bias="1"> @@ -399,6 +369,46 @@ </androidx.appcompat.widget.LinearLayoutCompat> + <androidx.constraintlayout.widget.Barrier + android:id="@+id/action_buttons_barrier" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:barrierDirection="bottom" + app:constraint_referenced_ids="button_attach,button_visibility, button_language, button_post, character_progress, button_sensitive" /> + + + <com.google.android.material.checkbox.MaterialCheckBox + android:id="@+id/sensitive_media" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_marginHorizontal="6dp" + android:layout_marginTop="6dp" + android:minHeight="36dp" + android:text="@string/toot_sensitive" + android:visibility="gone" + app:layout_constraintEnd_toEndOf="parent" + app:layout_constraintHorizontal_bias="0" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toBottomOf="@id/action_buttons_barrier" + app:layout_constraintWidth_default="wrap" /> + + <HorizontalScrollView + android:id="@+id/attachments_list_container" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginHorizontal="6dp" + app:layout_constraintTop_toBottomOf="@id/sensitive_media"> + + <androidx.appcompat.widget.LinearLayoutCompat + android:id="@+id/attachments_list" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:clipToPadding="false" + android:paddingEnd="6dp" + tools:ignore="RtlSymmetry" /> + + </HorizontalScrollView> + </androidx.constraintlayout.widget.ConstraintLayout> </com.google.android.material.card.MaterialCardView> |