Implement input bar redesign

This commit is contained in:
Niels Andriesse 2020-01-10 16:35:32 +11:00
parent 4f9b5f06f0
commit c05c1eecd8
30 changed files with 201 additions and 98 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -4,11 +4,11 @@
android:shape="rectangle">
<stroke
android:width="1dp"
android:color="@color/core_grey_75" />
android:width="1px"
android:color="@color/separator" />
<solid
android:color="@color/core_grey_90" />
android:color="@color/compose_text_view_background" />
<corners
android:radius="20dp" />

View File

@ -0,0 +1,36 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="27dp"
android:height="27dp"
android:viewportWidth="27"
android:viewportHeight="27">
<group>
<clip-path android:pathData="M-19,-756h375v812h-375z M 0,0"/>
<group>
<clip-path android:pathData="M-3,-3h33v33h-33z M 0,0"/>
<group>
<clip-path android:pathData="M13.51,8.82c-0.35,0 -0.63,0.28 -0.62,0.62v3.43H9.46c-0.35,0 -0.63,0.28 -0.62,0.62c0,0.35 0.28,0.63 0.62,0.62h3.43v3.43c-0.02,0.35 0.27,0.63 0.61,0.63c0.17,0 0.33,-0.07 0.44,-0.18c0.11,-0.11 0.18,-0.27 0.18,-0.44v-3.43h3.43c0.17,0 0.33,-0.07 0.44,-0.18c0.11,-0.11 0.18,-0.27 0.18,-0.44c0,-0.35 -0.28,-0.63 -0.62,-0.62h-3.43V9.44C14.13,9.09 13.85,8.81 13.51,8.82zM21.46,5.54c4.39,4.39 4.39,11.53 0,15.92c-4.39,4.39 -11.53,4.39 -15.92,0s-4.39,-11.53 0,-15.92C9.93,1.15 17.07,1.15 21.46,5.54zM22.34,22.34c4.88,-4.88 4.88,-12.81 0,-17.69s-12.81,-4.88 -17.69,0s-4.88,12.81 0,17.69S17.47,27.22 22.34,22.34z M 0,0"/>
<group>
<clip-path android:pathData="M0,0h27v27h-27z M 0,0"/>
<path
android:pathData="M-4,-4h35v35h-35z"
android:strokeAlpha="0.9"
android:fillColor="#FFFFFF"
android:fillAlpha="0.9"/>
</group>
</group>
</group>
<group>
<clip-path android:pathData="M-3,-3h33v33h-33z M 0,0"/>
<group>
<clip-path android:pathData="M0,0h27v27h-27z M 0,0"/>
<path
android:pathData="M13.51,8.82c-0.35,0 -0.63,0.28 -0.62,0.62v3.43H9.46c-0.35,0 -0.63,0.28 -0.62,0.62c0,0.35 0.28,0.63 0.62,0.62h3.43v3.43c-0.02,0.35 0.27,0.63 0.61,0.63c0.17,0 0.33,-0.07 0.44,-0.18c0.11,-0.11 0.18,-0.27 0.18,-0.44v-3.43h3.43c0.17,0 0.33,-0.07 0.44,-0.18c0.11,-0.11 0.18,-0.27 0.18,-0.44c0,-0.35 -0.28,-0.63 -0.62,-0.62h-3.43V9.44C14.13,9.09 13.85,8.81 13.51,8.82zM21.46,5.54c4.39,4.39 4.39,11.53 0,15.92c-4.39,4.39 -11.53,4.39 -15.92,0c-4.39,-4.39 -4.39,-11.53 0,-15.92C9.93,1.15 17.07,1.15 21.46,5.54zM22.34,22.34c4.88,-4.88 4.88,-12.81 0,-17.69s-12.81,-4.88 -17.69,0s-4.88,12.81 0,17.69S17.47,27.22 22.34,22.34z"
android:strokeAlpha="0.9"
android:strokeWidth="0.5"
android:fillColor="#00000000"
android:strokeColor="#FFFFFF"
android:fillAlpha="0.9"/>
</group>
</group>
</group>
</vector>

View File

@ -0,0 +1,36 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="18dp"
android:height="27dp"
android:viewportWidth="18"
android:viewportHeight="27">
<group>
<clip-path android:pathData="M-54,-756h375v812h-375z M 0,0"/>
<group>
<clip-path android:pathData="M-2,-2h23v31h-23z M 0,0"/>
<group>
<clip-path android:pathData="M9.36,2.25c2.02,0 3.67,1.64 3.67,3.65v6.65c0,2.01 -1.65,3.65 -3.67,3.65s-3.67,-1.64 -3.67,-3.65V5.9C5.69,3.89 7.34,2.25 9.36,2.25zM17.09,11.92c0.35,0 0.63,0.28 0.63,0.63c0,4.37 -3.41,7.97 -7.73,8.29v3.91h3.27c0.35,0 0.63,0.28 0.63,0.63S13.61,26 13.26,26H5.46c-0.35,0 -0.63,-0.28 -0.63,-0.63s0.28,-0.63 0.63,-0.63h3.27v-3.91C4.41,20.53 1,16.92 1,12.55c0,-0.35 0.28,-0.63 0.63,-0.63c0.35,0 0.62,0.28 0.61,0.63c0,3.9 3.19,7.07 7.11,7.07s7.11,-3.17 7.11,-7.07C16.46,12.2 16.74,11.92 17.09,11.92zM9.36,17.44c2.71,0 4.92,-2.2 4.92,-4.9V5.9c0,-2.7 -2.21,-4.9 -4.92,-4.9S4.44,3.2 4.44,5.9v6.65C4.44,15.25 6.65,17.44 9.36,17.44z M 0,0"/>
<group>
<clip-path android:pathData="M0,0h18v27h-18z M 0,0"/>
<path
android:pathData="M-4,-4h26.72v35h-26.72z"
android:strokeAlpha="0.9"
android:fillColor="#FFFFFF"
android:fillAlpha="0.9"/>
</group>
</group>
</group>
<group>
<clip-path android:pathData="M-2,-2h23v31h-23z M 0,0"/>
<group>
<clip-path android:pathData="M0,0h18v27h-18z M 0,0"/>
<path
android:pathData="M9.36,2.25c2.02,0 3.67,1.64 3.67,3.65v6.65c0,2.01 -1.65,3.65 -3.67,3.65s-3.67,-1.64 -3.67,-3.65V5.9C5.69,3.89 7.34,2.25 9.36,2.25zM17.09,11.92c0.35,0 0.63,0.28 0.63,0.63c0,4.37 -3.41,7.97 -7.73,8.29v3.91h3.27c0.35,0 0.63,0.28 0.63,0.63S13.61,26 13.26,26H5.46c-0.35,0 -0.63,-0.28 -0.63,-0.63s0.28,-0.63 0.63,-0.63h3.27v-3.91C4.41,20.53 1,16.92 1,12.55c0,-0.35 0.28,-0.63 0.63,-0.63s0.62,0.28 0.61,0.63c0,3.9 3.19,7.07 7.11,7.07s7.11,-3.17 7.11,-7.07C16.46,12.2 16.74,11.92 17.09,11.92zM9.36,17.44c2.71,0 4.92,-2.2 4.92,-4.9V5.9c0,-2.7 -2.21,-4.9 -4.92,-4.9S4.44,3.2 4.44,5.9v6.65C4.44,15.25 6.65,17.44 9.36,17.44z"
android:strokeAlpha="0.9"
android:strokeWidth="0.5"
android:fillColor="#00000000"
android:strokeColor="#FFFFFF"
android:fillAlpha="0.9"/>
</group>
</group>
</group>
</vector>

View File

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="?attr/dialog_background_color"/>
<corners android:radius="20dp"/>
<solid android:color="@color/compose_view_background"/>
<corners android:radius="12dp"/>
</shape>

View File

@ -233,6 +233,7 @@
android:id="@+id/close_button"
android:layout_width="53dp"
android:layout_height="53dp"
android:paddingTop="4dp"
android:src="@drawable/ic_keyboard_arrow_down_white_24dp"
android:scaleType="center"
android:contentDescription="@string/attachment_type_selector__drawer_description"

View File

@ -112,7 +112,9 @@
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:orientation="vertical"
android:clipChildren="false"
android:clipToPadding="false">
<include layout="@layout/view_mention_candidate_selection" />

View File

@ -9,6 +9,7 @@
android:gravity="center_vertical"
android:orientation="horizontal"
android:clickable="true"
android:background="@color/compose_view_background"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="6dp"
@ -96,8 +97,11 @@
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_weight="1"
android:textColorHint="#99FFFFFF"
android:textSize="@dimen/small_font_size"
android:nextFocusForward="@+id/send_button"
android:nextFocusRight="@+id/send_button"
android:textCursorDrawable="@drawable/session_edit_text_cursor"
tools:visibility="invisible"
tools:hint="Send TextSecure message" >
<requestFocus />
@ -178,7 +182,6 @@
android:layout_width="@dimen/conversation_compose_height"
android:layout_height="@dimen/conversation_compose_height"
android:layout_marginStart="12dp"
android:background="@drawable/circle_tintable"
android:layout_gravity="bottom">
<ImageButton
@ -187,7 +190,7 @@
android:layout_height="match_parent"
android:layout_gravity="center"
android:background="@drawable/circle_touch_highlight_background"
android:src="@drawable/ic_add_white_24dp"
android:src="@drawable/ic_circle_plus"
android:contentDescription="@string/ConversationActivity_add_attachment"
android:nextFocusLeft="@+id/embedded_text_editor" />
@ -195,11 +198,7 @@
android:id="@+id/send_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingTop="6dp"
android:paddingEnd="6dp"
android:paddingBottom="6dp"
android:paddingStart="11dp"
android:scaleType="fitCenter"
android:scaleType="centerInside"
android:contentDescription="@string/conversation_activity__send"
android:nextFocusLeft="@+id/embedded_text_editor"
android:src="?conversation_transport_sms_indicator"

View File

@ -7,14 +7,14 @@
<ImageButton
android:id="@+id/quick_audio_toggle"
android:layout_width="24dp"
android:layout_height="match_parent"
android:layout_height="24dp"
android:layout_gravity="center_vertical"
android:layout_marginEnd="2dp"
android:background="@null"
android:contentDescription="@string/conversation_activity__quick_attachment_drawer_record_and_send_audio_description"
android:scaleType="fitCenter"
android:tint="?compose_icon_tint"
app:srcCompat="@drawable/ic_mic_filled_24" />
android:scaleType="centerInside"
android:tint="@color/text"
app:srcCompat="@drawable/ic_microphone" />
<LinearLayout
android:id="@+id/lock_drop_target"
@ -59,7 +59,7 @@
android:clickable="false"
android:visibility="gone"
android:tint="@color/core_white"
app:srcCompat="@drawable/ic_mic_filled_24"
app:srcCompat="@drawable/ic_microphone"
tools:ignore="ContentDescription"
tools:visibility="visible" />
</merge>

View File

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<LinearLayout android:id="@+id/header_container"
android:background="@color/signal_primary"
<LinearLayout
android:id="@+id/header_container"
android:background="@color/accent"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
@ -15,14 +17,12 @@
</LinearLayout>
<TextView android:id="@+id/message"
<TextView
android:id="@+id/message"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingTop="40dp"
android:paddingBottom="40dp"
android:paddingStart="20dp"
android:paddingEnd="20dp"
android:textSize="15sp"
android:padding="@dimen/large_spacing"
android:textSize="@dimen/medium_font_size"
android:lineSpacingMultiplier="1.3"
tools:text="Signal needs access to your contacts and media in order to connect with friends, exchange messages, and make secure calls."/>

View File

@ -13,13 +13,14 @@
<ImageView
android:id="@+id/microphone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginStart="14dp"
android:importantForAccessibility="no"
android:tint="@color/red_500"
android:tint="@color/destructive"
android:visibility="invisible"
app:srcCompat="@drawable/ic_mic_filled_24"
android:scaleType="centerInside"
app:srcCompat="@drawable/ic_microphone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
@ -30,11 +31,12 @@
style="@style/Signal.Text.Body"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="2dp"
android:layout_marginStart="4dp"
android:ellipsize="none"
android:singleLine="true"
android:textColor="@color/core_grey_60"
android:textColor="#99FFFFFF"
android:visibility="gone"
android:textSize="@dimen/small_font_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@id/microphone"
app:layout_constraintTop_toTopOf="parent"
@ -47,17 +49,16 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginEnd="@dimen/medium_spacing"
android:ellipsize="none"
android:gravity="center_vertical"
android:padding="4dp"
android:text="@string/conversation_input_panel__cancel"
android:textAllCaps="true"
android:textColor="@color/red_500"
android:textSize="@dimen/small_font_size"
android:textColor="@color/destructive"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="@+id/frameLayout"
app:layout_constraintTop_toTopOf="parent"
tools:visibility="visible" />
@ -70,19 +71,33 @@
app:layout_constraintStart_toEndOf="@+id/record_time"
app:layout_constraintTop_toTopOf="parent">
<TextView
<LinearLayout
android:id="@+id/slide_to_cancel"
style="@style/Signal.Text.Caption"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:drawableStart="@drawable/ic_keyboard_arrow_left_grey600_24dp"
android:ellipsize="none"
android:orientation="horizontal"
android:gravity="center_vertical"
android:text="@string/conversation_input_panel__slide_to_cancel"
android:textAllCaps="true"
android:textColor="@color/core_grey_60"
android:visibility="gone"
tools:visibility="visible" />
tools:visibility="visible">
<ImageView
android:layout_width="24dp"
android:layout_height="24dp"
android:layout_marginTop="1dp"
android:src="@drawable/ic_keyboard_arrow_left_grey600_24dp"
android:tint="#99FFFFFF"
android:scaleType="centerInside" />
<TextView
style="@style/Signal.Text.Caption"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="@dimen/small_font_size"
android:ellipsize="none"
android:text="@string/conversation_input_panel__slide_to_cancel"
android:textColor="#99FFFFFF" />
</LinearLayout>
</FrameLayout>

View File

@ -2,11 +2,11 @@
<resources>
<style name="TextSecure.DarkTheme" parent="@style/TextSecure.BaseDarkTheme">
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
</style>
<style name="TextSecure.DarkNoActionBar" parent="@style/TextSecure.BaseDarkNoActionBar">
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="android:colorControlActivated">@color/signal_primary_dark</item>
</style>

View File

@ -20,6 +20,8 @@
<color name="fake_chat_bubble_text">#000000</color>
<color name="app_icon_background">#333132</color>
<color name="progress_bar_background">#0AFFFFFF</color>
<color name="compose_view_background">#1B1B1B</color>
<color name="compose_text_view_background">#141414</color>
<!-- Session -->
<!-- Loki -->

View File

@ -155,7 +155,7 @@
<dimen name="alertview_small_icon_size">14dp</dimen>
<dimen name="recording_voice_lock_target">-150dp</dimen>
<dimen name="recording_voice_lock_target">-96dp</dimen>
<dimen name="default_margin">16dp</dimen>
<dimen name="drawable_padding">24dp</dimen>

View File

@ -172,13 +172,13 @@
<string name="ConversationActivity_unable_to_record_audio">Unable to record audio!</string>
<string name="ConversationActivity_there_is_no_app_available_to_handle_this_link_on_your_device">There is no app available to handle this link on your device.</string>
<string name="ConversationActivity_to_send_audio_messages_allow_signal_access_to_your_microphone">To send audio messages, allow Loki Messenger access to your microphone.</string>
<string name="ConversationActivity_signal_requires_the_microphone_permission_in_order_to_send_audio_messages">Loki Messenger requires the Microphone permission in order to send audio messages, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Microphone\".</string>
<string name="ConversationActivity_to_call_s_signal_needs_access_to_your_microphone_and_camera">To call %s, Loki Messenger needs access to your microphone and camera.</string>
<string name="ConversationActivity_signal_needs_the_microphone_and_camera_permissions_in_order_to_call_s">Loki Messenger needs the Microphone and Camera permissions in order to call %s, but they have been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Microphone\" and \"Camera\".</string>
<string name="ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera">To capture photos and video, allow Loki Messenger access to the camera.</string>
<string name="ConversationActivity_signal_needs_the_camera_permission_to_take_photos_or_video">Loki Messenger needs the Camera permission to take photos or video, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Camera\".</string>
<string name="ConversationActivity_signal_needs_camera_permissions_to_take_photos_or_video">Loki Messenger needs Camera permissions to take photos or video</string>
<string name="ConversationActivity_to_send_audio_messages_allow_signal_access_to_your_microphone">Session needs microphone access to send audio messages.</string>
<string name="ConversationActivity_signal_requires_the_microphone_permission_in_order_to_send_audio_messages">Session needs microphone access to send audio messages, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Microphone\".</string>
<string name="ConversationActivity_to_call_s_signal_needs_access_to_your_microphone_and_camera">Session needs microphone and camera access to make calls.</string>
<string name="ConversationActivity_signal_needs_the_microphone_and_camera_permissions_in_order_to_call_s">Session needs microphone and camera access to call %s, but they have been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Microphone\" and \"Camera\".</string>
<string name="ConversationActivity_to_capture_photos_and_video_allow_signal_access_to_the_camera">Session needs camera access to take photos and videos.</string>
<string name="ConversationActivity_signal_needs_the_camera_permission_to_take_photos_or_video">Session needs camera access to take photos and videos, but it has been permanently denied. Please continue to app settings, select \"Permissions\", and enable \"Camera\".</string>
<string name="ConversationActivity_signal_needs_camera_permissions_to_take_photos_or_video">Session needs camera access to take photos or videos.</string>
<string name="ConversationActivity_quoted_contact_message">%1$s %2$s</string>
<string name="ConversationActivity_signal_cannot_sent_sms_mms_messages_because_it_is_not_your_default_sms_app">Loki Messenger cannot send SMS/MMS messages because it is not your default SMS app. Would you like to change this in your Android settings?</string>

View File

@ -332,8 +332,8 @@
</style>
<style name="AttachmentTypeLabel">
<item name="android:textColor">#ff999999</item>
<item name="android:textSize">14sp</item>
<item name="android:textColor">#99FFFFFF</item>
<item name="android:textSize">@dimen/small_font_size</item>
</style>
<style name="Button.Primary" parent="Base.Widget.AppCompat.Button.Colored">

View File

@ -35,7 +35,7 @@
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/textsecure_primary_dark</item>
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="recipient_preference_blocked">#d00000</item>
<item name="contact_selection_label_text">#66000000</item>
@ -64,7 +64,7 @@
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/signal_primary_dark</item>
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="recipient_preference_blocked">#d00000</item>
<item name="contact_selection_label_text">#66eeeeee</item>
@ -154,14 +154,14 @@
<item name="actionModeCloseDrawable">@drawable/ic_close_white_24dp</item>
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="colorAccent">@color/textsecure_primary_dark</item>
<item name="colorControlActivated">@color/signal_primary</item>
<item name="colorControlHighlight">@color/signal_primary</item>
<item name="colorAccent">@color/accent</item>
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlHighlight">@color/accent</item>
<item name="android:windowBackground">@color/loki_darkest_gray</item>
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleLight</item>
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleLight</item>
<item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.Light.BottomSheetDialog</item>
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<!--<item name="android:windowContentOverlay">@drawable/compat_actionbar_shadow_background</item>-->
<item name="attachment_type_selector_background">@color/white</item>
@ -191,8 +191,8 @@
<item name="conversation_editor_text_color">#ff111111</item>
<item name="conversation_input_background">@drawable/compose_background_light</item>
<item name="conversation_input_inline_attach_icon_tint">@color/core_grey_60</item>
<item name="conversation_transport_sms_indicator">@drawable/ic_send_sms_insecure</item>
<item name="conversation_transport_push_indicator">@drawable/ic_send_push</item>
<item name="conversation_transport_sms_indicator">@drawable/ic_arrow_up</item>
<item name="conversation_transport_push_indicator">@drawable/ic_arrow_up</item>
<item name="conversation_transport_popup_background">@color/white</item>
<item name="conversation_emoji_toggle">@drawable/ic_emoji_filled_keyboard_light</item>
<item name="conversation_sticker_toggle">@drawable/ic_sticker_filled_keyboard_light</item>
@ -213,11 +213,11 @@
<item name="verification_background">@color/core_grey_05</item>
<item name="emoji_tab_strip_background">@color/core_grey_05</item>
<item name="emoji_tab_strip_background">@color/cell_background</item>
<item name="emoji_tab_indicator">#66555555</item>
<item name="emoji_tab_underline">#44555555</item>
<item name="emoji_tab_seperator">@color/gray20</item>
<item name="emoji_drawer_background">@color/core_grey_02</item>
<item name="emoji_drawer_background">@color/compose_view_background</item>
<item name="emoji_text_color">@color/black</item>
<item name="emoji_category_recent">@drawable/ic_recent_light_20</item>
@ -340,14 +340,14 @@
<item name="actionModeCloseDrawable">@drawable/ic_close_white_24dp</item>
<item name="android:textColor">@color/text_color_dark_theme</item>
<item name="android:textColorSecondary">@color/text_color_secondary_dark_theme</item>
<item name="colorAccent">@color/textsecure_primary_dark</item>
<item name="colorControlActivated">@color/signal_primary_dark</item>
<item name="colorControlHighlight">@color/signal_primary_dark</item>
<item name="colorAccent">@color/accent</item>
<item name="colorControlActivated">@color/accent</item>
<item name="colorControlHighlight">@color/accent</item>
<item name="android:windowBackground">@color/loki_darkest_gray</item>
<item name="alertDialogTheme">@style/AppCompatAlertDialogStyleDark</item>
<item name="android:alertDialogTheme">@style/AppCompatDialogStyleDark</item>
<item name="bottomSheetDialogTheme">@style/Theme.MaterialComponents.BottomSheetDialog</item>
<item name="android:navigationBarColor">@color/navigation_bar_background</item>
<item name="android:navigationBarColor">@color/compose_view_background</item>
<item name="attachment_type_selector_background">@color/gray95</item>
<item name="attachment_document_icon_small">@drawable/ic_document_small_dark</item>
@ -428,11 +428,11 @@
<item name="conversation_sticker_footer_icon_color">@color/core_grey_25</item>
<item name="conversation_sticker_author_color">@color/core_grey_05</item>
<item name="emoji_tab_strip_background">@color/core_grey_85</item>
<item name="emoji_tab_indicator">@color/gray65</item>
<item name="emoji_tab_strip_background">@color/compose_view_background</item>
<item name="emoji_tab_indicator">@color/accent</item>
<item name="emoji_tab_underline">@color/gray78</item>
<item name="emoji_tab_seperator">@color/gray70</item>
<item name="emoji_drawer_background">@color/core_grey_95</item>
<item name="emoji_drawer_background">@color/compose_text_view_background</item>
<item name="emoji_text_color">@color/white</item>
<item name="emoji_category_recent">@drawable/ic_recent_dark_20</item>

View File

@ -10,6 +10,8 @@ import org.thoughtcrime.securesms.util.CharacterCalculator;
import org.thoughtcrime.securesms.util.CharacterCalculator.CharacterState;
import org.whispersystems.libsignal.util.guava.Optional;
import network.loki.messenger.R;
public class TransportOption implements Parcelable {
public enum Type {
@ -84,7 +86,7 @@ public class TransportOption implements Parcelable {
}
public @DrawableRes int getDrawable() {
return drawable;
return R.drawable.ic_arrow_up;
}
public int getBackgroundColor() {

View File

@ -24,7 +24,6 @@ import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.components.emoji.EmojiKeyboardProvider;
import org.thoughtcrime.securesms.components.emoji.EmojiToggle;
import org.thoughtcrime.securesms.components.emoji.MediaKeyboard;
@ -48,6 +47,8 @@ import org.whispersystems.libsignal.util.guava.Optional;
import java.util.List;
import java.util.concurrent.TimeUnit;
import network.loki.messenger.R;
public class InputPanel extends LinearLayout
implements MicrophoneRecorderView.Listener,
KeyboardAwareLinearLayout.OnKeyboardShownListener,
@ -108,7 +109,8 @@ public class InputPanel extends LinearLayout
this.buttonToggle = findViewById(R.id.button_toggle);
this.recordingContainer = findViewById(R.id.recording_container);
this.recordLockCancel = findViewById(R.id.record_cancel);
this.slideToCancel = new SlideToCancel(findViewById(R.id.slide_to_cancel));
View slideToCancelView = findViewById(R.id.slide_to_cancel);
this.slideToCancel = new SlideToCancel(slideToCancelView);
this.microphoneRecorderView = findViewById(R.id.recorder_view);
this.microphoneRecorderView.setListener(this);
this.recordTime = new RecordTime(findViewById(R.id.record_time),

View File

@ -20,10 +20,11 @@ import android.view.animation.TranslateAnimation;
import android.widget.FrameLayout;
import android.widget.ImageView;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.permissions.Permissions;
import org.thoughtcrime.securesms.util.ViewUtil;
import network.loki.messenger.R;
public final class MicrophoneRecorderView extends FrameLayout implements View.OnTouchListener {
enum State {
@ -156,7 +157,7 @@ public final class MicrophoneRecorderView extends FrameLayout implements View.On
FloatingRecordButton(Context context, ImageView recordButtonFab) {
this.recordButtonFab = recordButtonFab;
this.recordButtonFab.getBackground().setColorFilter(context.getResources()
.getColor(R.color.red_500),
.getColor(R.color.destructive),
PorterDuff.Mode.SRC_IN);
}

View File

@ -1,16 +1,18 @@
package org.thoughtcrime.securesms.components.emoji;
import android.content.Context;
import android.content.res.ColorStateList;
import android.content.res.TypedArray;
import android.graphics.drawable.Drawable;
import android.support.annotation.NonNull;
import android.support.v7.widget.AppCompatImageButton;
import android.util.AttributeSet;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.stickers.StickerKeyboardProvider;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import network.loki.messenger.R;
public class EmojiToggle extends AppCompatImageButton implements MediaKeyboard.MediaKeyboardListener {
private Drawable emojiToggle;
@ -54,6 +56,8 @@ public class EmojiToggle extends AppCompatImageButton implements MediaKeyboard.M
this.imeToggle = drawables.getDrawable(2);
this.mediaToggle = emojiToggle;
setImageTintList(ColorStateList.valueOf(getResources().getColor(R.color.text)));
drawables.recycle();
setToMedia();
}

View File

@ -31,7 +31,6 @@ import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.PorterDuff.Mode;
import android.graphics.drawable.ColorDrawable;
import android.hardware.Camera;
import android.net.Uri;
@ -1604,8 +1603,6 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
calculateCharactersRemaining();
updateLinkPreviewState();
composeText.setTransport(newTransport);
buttonToggle.getBackground().setColorFilter(newTransport.getBackgroundColor(), Mode.MULTIPLY);
buttonToggle.getBackground().invalidateSelf();
if (manuallySelected) recordTransportPreference(newTransport);
});
@ -2237,8 +2234,8 @@ public class ConversationActivity extends PassphraseRequiredActionBarActivity
private void setInputPanelEnabled(boolean enabled) {
Util.runOnMain(() -> {
updateToggleButtonState();
int hintID = enabled ? R.string.activity_conversation_default_hint : R.string.activity_conversation_pending_friend_request_hint;
inputPanel.setHint(getResources().getString(hintID));
String hint = enabled ? "Message" : "Pending message request";
inputPanel.setHint(hint);
inputPanel.setEnabled(enabled);
if (enabled) {
inputPanel.composeText.requestFocus();

View File

@ -111,6 +111,7 @@ class EnterPublicKeyFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
publicKeyTextView.imeOptions = publicKeyTextView.imeOptions or 16777216 // Always use incognito keyboard
publicKeyTextView.text = hexEncodedPublicKey
copyButton.setOnClickListener { copyPublicKey() }
shareButton.setOnClickListener { sharePublicKey() }

View File

@ -20,6 +20,7 @@ class DisplayNameActivity : BaseActionBarActivity() {
super.onCreate(savedInstanceState)
setUpActionBarSessionLogo()
setContentView(R.layout.activity_display_name_v2)
displayNameEditText.imeOptions = displayNameEditText.imeOptions or 16777216 // Always use incognito keyboard
registerButton.setOnClickListener { register() }
}

View File

@ -125,6 +125,7 @@ class EnterChatURLFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
chatURLEditText.imeOptions = chatURLEditText.imeOptions or 16777216 // Always use incognito keyboard
joinPublicChatButton.setOnClickListener { joinPublicChatIfPossible() }
}

View File

@ -90,6 +90,7 @@ class EnterSessionIDFragment : Fragment() {
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
sessionIDEditText.imeOptions = sessionIDEditText.imeOptions or 16777216 // Always use incognito keyboard
requestDeviceLinkButton.setOnClickListener { requestDeviceLinkIfPossible() }
}