From 136be83ed5c840ea3e2e615283f61119d9853e2a Mon Sep 17 00:00:00 2001 From: 0xd9a <0xd9a@noreply.codeberg.org> Date: Sat, 24 Dec 2022 15:00:01 +0530 Subject: [PATCH] Update compose UI --- .../drawable/ic_compose_attachment_play.xml | 6 +- .../res/layout/compose_attachment_item.xml | 66 ++- .../main/res/layout/drawer_status_compose.xml | 426 ++++++++---------- app/src/main/res/values/themes.xml | 5 + 4 files changed, 212 insertions(+), 291 deletions(-) diff --git a/app/src/main/res/drawable/ic_compose_attachment_play.xml b/app/src/main/res/drawable/ic_compose_attachment_play.xml index 9b7ecb7f..cabd5d80 100644 --- a/app/src/main/res/drawable/ic_compose_attachment_play.xml +++ b/app/src/main/res/drawable/ic_compose_attachment_play.xml @@ -4,9 +4,9 @@ android:viewportWidth="24" android:viewportHeight="24"> + android:fillColor="?attr/colorOnTertiary" + android:pathData="M10,15.5v-7c0,-0.41 0.47,-0.65 0.8,-0.4l4.67,3.5c0.27,0.2 0.27,0.6 0,0.8l-4.67,3.5c-0.33,0.25 -0.8,0.01 -0.8,-0.4z" /> diff --git a/app/src/main/res/layout/compose_attachment_item.xml b/app/src/main/res/layout/compose_attachment_item.xml index 77b32b69..ebf9c3b0 100644 --- a/app/src/main/res/layout/compose_attachment_item.xml +++ b/app/src/main/res/layout/compose_attachment_item.xml @@ -15,7 +15,7 @@ - - + - + android:clipToPadding="false"> - - + android:orientation="vertical"> + app:layout_constraintEnd_toStartOf="@id/button_emoji" + app:layout_constraintStart_toStartOf="parent" + app:layout_constraintTop_toTopOf="parent" + tools:visibility="visible" /> + + - + app:layout_constraintTop_toBottomOf="@id/add_remove_status" /> - - - - + - + app:layout_constraintTop_toBottomOf="@id/text_area_divider" /> - + - - - - - - + + @@ -219,16 +201,18 @@ android:layout_height="12dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toStartOf="@id/button_post" - app:layout_constraintStart_toEndOf="@id/action_container" + app:layout_constraintStart_toEndOf="@id/button_language" app:layout_constraintTop_toBottomOf="@id/character_count" /> @@ -236,9 +220,8 @@ android:id="@+id/attachment_choices_panel" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginStart="6dp" - android:elevation="2dp" - android:background="?colorSurface" + android:background="?colorSurfaceVariant" + android:padding="6dp" android:visibility="gone" 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" @@ -246,177 +229,124 @@ app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintStart_toStartOf="parent" /> - + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_compose_attach_image" /> - + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_compose_attach_audio" /> - + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_compose_attach_video" /> - - - + style="@style/Widget.Material3.Button.IconButton.Outlined" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_baseline_close_24" /> - + style="@style/Widget.Material3.Button.IconButton" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + app:icon="@drawable/ic_compose_poll" /> + + + app:layout_constraintTop_toTopOf="parent"> - + android:orientation="vertical" + android:padding="6dp" + app:singleSelection="true"> - + android:insetTop="0dp" + android:insetBottom="0dp" + android:minHeight="36dp" + android:text="@string/v_direct" + android:textAlignment="textStart" + app:icon="@drawable/ic_compose_visibility_direct" /> - - - - - - - - - - - - - - - + android:textAlignment="textStart" + app:icon="@drawable/ic_compose_visibility_private" /> - - - - - - - + android:textAlignment="textStart" + app:icon="@drawable/ic_compose_visibility_unlisted" /> - - - - - - - + android:textAlignment="textStart" + app:icon="@drawable/ic_compose_visibility_public" /> - + + + diff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml index 3235b549..d13d71d9 100644 --- a/app/src/main/res/values/themes.xml +++ b/app/src/main/res/values/themes.xml @@ -240,4 +240,9 @@ @color/solarized_md_theme_light_inversePrimary +