mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-05-02 22:53:09 +01:00
Implement new bottom fragment UX for multiforward.
This commit is contained in:
committed by
Cody Henthorne
parent
561cca5208
commit
dc1e56de4e
10
app/src/main/res/drawable/ic_send_24.xml
Normal file
10
app/src/main/res/drawable/ic_send_24.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@color/core_white"
|
||||
android:pathData="M22.1,10.915 L5.286,1.306A1.25,1.25 0,0 0,3.433 2.6L4.69,10.138 14,12 4.69,13.862 3.433,21.4a1.25,1.25 0,0 0,1.853 1.291L22.1,13.085A1.25,1.25 0,0 0,22.1 10.915Z" />
|
||||
</vector>
|
||||
41
app/src/main/res/layout/multiselect_forward_fragment.xml
Normal file
41
app/src/main/res/layout/multiselect_forward_fragment.xml
Normal file
@@ -0,0 +1,41 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.appcompat.widget.LinearLayoutCompat xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<View
|
||||
android:id="@+id/anchor"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="2dp"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="16dp"
|
||||
android:background="@color/signal_icon_tint_tab_unselected" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/title"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="13dp"
|
||||
android:gravity="center"
|
||||
android:text="@string/MultiselectForwardFragment__forward_to"
|
||||
android:textAppearance="@style/TextAppearance.Signal.Body1.Bold" />
|
||||
|
||||
<org.thoughtcrime.securesms.components.ContactFilterView
|
||||
android:id="@+id/contact_filter_edit_text"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="@dimen/dsl_settings_gutter"
|
||||
android:layout_marginTop="17dp"
|
||||
android:layout_marginRight="@dimen/dsl_settings_gutter"
|
||||
android:minHeight="44dp" />
|
||||
|
||||
<androidx.fragment.app.FragmentContainerView
|
||||
android:id="@+id/contact_selection_list_fragment"
|
||||
android:name="org.thoughtcrime.securesms.ContactSelectionListFragment"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginTop="12dp"
|
||||
android:layout_weight="1" />
|
||||
|
||||
</androidx.appcompat.widget.LinearLayoutCompat>
|
||||
@@ -0,0 +1,68 @@
|
||||
<?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_gravity="bottom">
|
||||
|
||||
<View
|
||||
android:id="@+id/divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/signal_divider_minor"
|
||||
app:layout_constraintBottom_toBottomOf="@id/share_confirm"
|
||||
app:layout_constraintTop_toTopOf="@id/share_confirm" />
|
||||
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/selected_list"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="44dp"
|
||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||
android:background="@color/signal_background_primary"
|
||||
android:clipToPadding="false"
|
||||
android:orientation="horizontal"
|
||||
android:paddingStart="@dimen/dsl_settings_gutter"
|
||||
android:paddingEnd="78dp"
|
||||
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/divider"
|
||||
tools:listitem="@layout/share_contact_selection_item" />
|
||||
|
||||
<FrameLayout
|
||||
android:id="@+id/add_message_wrapper"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@color/signal_background_primary"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/selected_list">
|
||||
|
||||
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
|
||||
android:id="@+id/add_message"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/dsl_settings_gutter"
|
||||
android:layout_marginEnd="@dimen/dsl_settings_gutter"
|
||||
android:background="@drawable/rounded_rectangle_secondary"
|
||||
android:hint="@string/MultiselectForwardFragment__add_a_message"
|
||||
android:minHeight="44dp"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:textAppearance="@style/Signal.Text.Body" />
|
||||
</FrameLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/share_confirm"
|
||||
android:layout_width="56dp"
|
||||
android:layout_height="56dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:contentDescription="@string/ShareActivity__share"
|
||||
app:backgroundTint="@color/signal_accent_primary"
|
||||
app:layout_constraintBottom_toBottomOf="@id/divider"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:srcCompat="@drawable/ic_send_24" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
@@ -3689,6 +3689,11 @@
|
||||
|
||||
<!-- DSLSettingsToolbar -->
|
||||
<string name="DSLSettingsToolbar__navigate_up">Navigate up</string>
|
||||
<string name="MultiselectForwardFragment__forward_to">Forward to</string>
|
||||
<string name="MultiselectForwardFragment__add_a_message">Add a message</string>
|
||||
<string name="MultiselectForwardFragment__messages_sent">Messages sent</string>
|
||||
<string name="MultiselectForwardFragment__messages_failed_to_send">Messages failed to send</string>
|
||||
<string name="MultiselectForwardFragment__limit_reached">Limit reached</string>
|
||||
|
||||
<!-- EOF -->
|
||||
|
||||
|
||||
@@ -389,6 +389,17 @@
|
||||
<item name="backgroundTint">@color/react_with_any_background</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Signal.FixedRoundedCorners" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
|
||||
<item name="android:windowIsFloating">false</item>
|
||||
<item name="android:windowSoftInputMode">adjustResize</item>
|
||||
<item name="bottomSheetStyle">@style/Widget.Signal.FixedRoundedCorners.BottomSheet</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.Signal.FixedRoundedCorners.BottomSheet" parent="Widget.MaterialComponents.BottomSheet">
|
||||
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.Signal.BottomSheet.Rounded</item>
|
||||
<item name="backgroundTint">@color/signal_background_primary</item>
|
||||
</style>
|
||||
|
||||
<style name="ShapeAppearanceOverlay.Signal.BottomSheet.Rounded" parent="">
|
||||
<item name="cornerFamily">rounded</item>
|
||||
<item name="cornerSizeTopRight">18dp</item>
|
||||
|
||||
Reference in New Issue
Block a user