Add schedule send message creation ui
Move android-smsmms logic into a separate file
This commit is contained in:
parent
acefd0c0f4
commit
7624174cad
16 changed files with 485 additions and 60 deletions
10
app/src/main/res/drawable/ic_calendar_month_vector.xml
Normal file
10
app/src/main/res/drawable/ic_calendar_month_vector.xml
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M19,4h-1V2h-2v2H8V2H6v2H5C3.89,4 3.01,4.9 3.01,6L3,20c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2V6C21,4.9 20.1,4 19,4zM19,20H5V10h14V20zM9,14H7v-2h2V14zM13,14h-2v-2h2V14zM17,14h-2v-2h2V14zM9,18H7v-2h2V18zM13,18h-2v-2h2V18zM17,18h-2v-2h2V18z" />
|
||||
</vector>
|
||||
11
app/src/main/res/drawable/ic_schedule_send_vector.xml
Normal file
11
app/src/main/res/drawable/ic_schedule_send_vector.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:autoMirrored="true"
|
||||
android:tint="#FFFFFF"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M16.5,12.5L15,12.5v4l3,2 0.75,-1.23 -2.25,-1.52L16.5,12.5zM16,9L2,3v7l9,2 -9,2v7l7.27,-3.11C10.09,20.83 12.79,23 16,23c3.86,0 7,-3.14 7,-7s-3.14,-7 -7,-7zM16,21c-2.75,0 -4.98,-2.22 -5,-4.97v-0.07c0.02,-2.74 2.25,-4.97 5,-4.97 2.76,0 5,2.24 5,5S18.76,21 16,21z" />
|
||||
</vector>
|
||||
|
|
@ -119,7 +119,9 @@
|
|||
android:overScrollMode="ifContentScrolls"
|
||||
android:scrollbars="none"
|
||||
app:layoutManager="com.simplemobiletools.commons.views.MyLinearLayoutManager"
|
||||
app:stackFromEnd="true" />
|
||||
app:stackFromEnd="true"
|
||||
tools:itemCount="3"
|
||||
tools:listitem="@layout/item_sent_message" />
|
||||
|
||||
</com.qtalk.recyclerviewfastscroller.RecyclerViewFastScroller>
|
||||
|
||||
|
|
@ -127,7 +129,7 @@
|
|||
android:id="@+id/message_divider"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1px"
|
||||
android:layout_above="@+id/thread_attachments_holder"
|
||||
android:layout_above="@+id/scheduled_message_holder"
|
||||
android:background="@color/divider_grey"
|
||||
android:importantForAccessibility="no" />
|
||||
|
||||
|
|
@ -145,13 +147,57 @@
|
|||
android:padding="@dimen/normal_margin"
|
||||
android:src="@drawable/ic_plus_vector" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/scheduled_message_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/thread_attachments_holder"
|
||||
android:layout_alignStart="@id/thread_type_message"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:layout_marginEnd="@dimen/medium_margin"
|
||||
android:layout_marginBottom="@dimen/small_margin"
|
||||
android:background="@drawable/section_holder_stroke"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/scheduled_message_button"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:clickable="true"
|
||||
android:drawableStart="@drawable/ic_clock_vector"
|
||||
android:drawablePadding="@dimen/normal_margin"
|
||||
android:focusable="true"
|
||||
android:gravity="center_vertical"
|
||||
android:minHeight="@dimen/normal_icon_size"
|
||||
android:paddingStart="@dimen/normal_margin"
|
||||
android:paddingEnd="48dp"
|
||||
android:text="Tomorrow at 6PM GMT +05:30"
|
||||
android:textSize="@dimen/middle_text_size"
|
||||
tools:ignore="HardcodedText" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/discard_scheduled_message"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:background="?selectableItemBackgroundBorderless"
|
||||
android:contentDescription="@string/cancel_schedule_send"
|
||||
android:padding="@dimen/normal_margin"
|
||||
android:src="@drawable/ic_cross_vector" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
<HorizontalScrollView
|
||||
android:id="@+id/thread_attachments_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_above="@+id/thread_type_message"
|
||||
android:layout_alignStart="@+id/thread_type_message"
|
||||
android:layout_marginTop="@dimen/normal_margin"
|
||||
android:layout_marginTop="@dimen/medium_margin"
|
||||
android:layout_marginBottom="@dimen/small_margin"
|
||||
android:overScrollMode="never"
|
||||
android:scrollbars="none"
|
||||
|
|
|
|||
74
app/src/main/res/layout/schedule_message_dialog.xml
Normal file
74
app/src/main/res/layout/schedule_message_dialog.xml
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
<?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:id="@+id/scheduled_message_dialog_holder"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="@dimen/activity_margin">
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/subtitle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginHorizontal="@dimen/activity_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="@dimen/tiny_margin"
|
||||
android:text="@string/schedule_send_warning"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/dateIcon"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:layout_margin="@dimen/activity_margin"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_calendar_month_vector"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/subtitle" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/edit_date"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tiny_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="@dimen/small_margin"
|
||||
android:textSize="@dimen/date_time_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/dateIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/dateIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/dateIcon"
|
||||
tools:text="25 sep, 2022" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatImageView
|
||||
android:id="@+id/timeIcon"
|
||||
android:layout_width="@dimen/normal_icon_size"
|
||||
android:layout_height="@dimen/normal_icon_size"
|
||||
android:layout_margin="@dimen/activity_margin"
|
||||
android:padding="@dimen/medium_margin"
|
||||
android:src="@drawable/ic_clock_vector"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/dateIcon" />
|
||||
|
||||
<com.simplemobiletools.commons.views.MyTextView
|
||||
android:id="@+id/edit_time"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="@dimen/tiny_margin"
|
||||
android:background="?attr/selectableItemBackground"
|
||||
android:ellipsize="end"
|
||||
android:includeFontPadding="false"
|
||||
android:padding="@dimen/small_margin"
|
||||
android:textSize="@dimen/date_time_text_size"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/timeIcon"
|
||||
app:layout_constraintStart_toEndOf="@+id/timeIcon"
|
||||
app:layout_constraintTop_toTopOf="@+id/timeIcon"
|
||||
tools:text="07:00 AM" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
|
@ -7,4 +7,5 @@
|
|||
<dimen name="remove_attachment_size">24dp</dimen>
|
||||
<dimen name="pin_icon_size">15dp</dimen>
|
||||
<dimen name="vcard_property_start_margin">64dp</dimen>
|
||||
<dimen name="date_time_text_size">36sp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@
|
|||
<string name="unpin_conversation">Unpin</string>
|
||||
<string name="forward_message">Forward</string>
|
||||
<string name="compress_error">Unable to compress image to selected size</string>
|
||||
<string name="back">Back</string>
|
||||
<!-- vCard-->
|
||||
<plurals name="and_other_contacts">
|
||||
<item quantity="one">and %d other</item>
|
||||
|
|
@ -29,6 +30,11 @@
|
|||
<string name="new_conversation">New conversation</string>
|
||||
<string name="add_contact_or_number">Add Contact or Number…</string>
|
||||
<string name="suggestions">Suggestions</string>
|
||||
<!-- Schedule send -->
|
||||
<string name="schedule_send">Schedule send</string>
|
||||
<string name="cancel_schedule_send">Cancel schedule send</string>
|
||||
<string name="must_pick_time_in_the_future">You must pick a time in the future</string>
|
||||
<string name="schedule_send_warning">Keep the phone on and make sure nothing\'s killing the app in background</string>
|
||||
<!-- Notifications -->
|
||||
<string name="channel_received_sms">Received SMS</string>
|
||||
<string name="new_message">New message</string>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue