Add emoji reacts support (#889)

* feat: Add emoji reacts support

* Remove message multi-selection

* Add emoji reaction model

* Add emoji reaction panel

* Blur reacts panel background

* Show emoji keyboard

* Add emoji sprites

* Update reaction proto

* Emoji database updates

* Emoji database refactor

* Emoji reaction persistence

* Optimize reactions retrieval

* Fix emoji group query

* Display emojis

* Fix emoji persistence

* Cleanup

* Persistence refactor

* Add reactions bottom sheet

* Cleanup

* Ui tweaks

* React with any emoji

* Show emoji react notifications

* Remove reaction

* Show reactions modal on long press

* Click to react (+1) with an emoji

* Click to react with an emoji

* Enable emoji expand/collapse

* fix: some compile issues from merge conflicts

* fix: compile issues merging quote and media message UI

* fix: xml IDs and adding in legacy is selected for future inclusion

* Fix view constraints

* Fix merge issue

* Add message selection option in conversation context menu

* Add sogs emoji integration

* Handle sogs emoji reactions

* Enable sending/deleting sogs emojis

* fix: improve the visible message layout

* fix: add file IDs to request parameters for message send (#940)

* Fix open group polling from seqno instead of last hash (#939)

* fix: reset seqno to get recent messages from open groups

* build: upgrade build numbers

* fix: actually run the migration

* Using StringBuilder to construct request url

* Fix reaction filter

* fix: is_mms added in second projection query

* Update default emojis

* fix: include legacy and new open groups in server ID tracking (#941)

* feat: add hidden moderator and admin roles, separated as they may be used independently in future (#942)

* Cleanup

* Fix view constraints

* Add reactions capability check

* Fix reactions alignment

* Ui fixes

* Display reactions list

* feat: add formatted count strings

* fix: account for negatives and add tests

* Migrate old official open group locations for polling and adding (#932)

* feat: adding in first part of open group migrations and tests for migration logic / helpers

* feat: test code and migration logic for open groups in the case of no conflicts

* feat: add in extra test cases and refactor code for migrator

* refactor: migrate open group join URLs and references to server in adding new open groups to catch legacy and re-write it

* refactor: joining open groups using OpenGroupUrlParser.kt now

* fix: add in compile issues for renamed OpenGroupApi.kt from OpenGroupV2

* fix: prevent duplicates of http/https for new open group DNS and prevent adding new groups based on public key

* fix: room and server swapped parameters

* fix: replace default server for config messages

* fix: actually using public key to de-dupe didn't work for rooms

* build: bump version code and name

* Display reactions list on open groups for moderators

* Ui tweaks

* Ui tweaks for moderation

* Refactor

* fix: compile issue

* fix: de-duping joined queries in the get X from cursor

* Restore import

* fix: colouring the reaction overlay scrubber

* fix: highlight colour, show reaction count if 1 or above

* Cleanup

* fix: light mode accent

* fix: light / dark mode themeing in reactions dialog fragment

* Emoji notification blinded id check

* fix: show reaction list correctly and pass isUserModerator to bind methods

* fix: remove unnecessary places for the moderator

* fix: X button for removing own react not showing up properly

* feat: add clear all header view

* fix: migrate the clear all to the correct location

* fix: use display instead of base

* Truncate emoji sender ids

* feat: add notify thread function in thread db

* Notify threads on reaction received

* fix: design fixes for the reaction list

* fix: emoji reactions bottom sheet dialog UI designs

* feat: add unsupported emoji reaction

* fix: crash and doing vector properly

* Fix reaction database queries

* Fix background open group adder job

* Show new open group reactions

* Fetch a maximum of 5 reactors

* Handle open group reactions polling conflicts

* Add count to user reaction

* Show number of additional reactors

* fix: unreads set same as the unread query

* fix: design changes

* fix: update dependency to improve flexboxlayout behaviour, design consistencies

* Add select message icon and update long press menu items order and wording

* Fix crash on reactors dialog

* fix: colours and backgrounds to match designs

* fix: add header in recipient item

* fix: margins

* fix: alignments and layout issues for emoji reactions view

* feat: add overflow previews and logic for overflow

* Dim action bar

* Add emoji search

* Search index fix

* Set count for 1:1 and closed group reactions when inserting in local database

* Use on screen toolbar to allow overlaying

* Show/hide scroll to bottom button

* feat: add extended properties so it doesn't collapse on re-bind

* Cleanup

* feat: prevent keeping extended on rebinding if we get a new message ID

* fix: long press works on devices now, fix release lint issue and crash for emoji search DBs from emoji builds

* Display message timestamp

* Fix modal items alignment

* fix: sort order and emoji count in compareTo

* Scale down really large messages to fit

* Prevent closed group crash

* Fix reaction author

Co-authored-by: charles <charles@oxen.io>
Co-authored-by: jubb <hjubb@users.noreply.github.com>
This commit is contained in:
ceokot
2022-09-04 21:03:32 +10:00
committed by GitHub
parent 2bfc8215d4
commit 16ca97d2d3
230 changed files with 11280 additions and 1004 deletions

View File

@@ -0,0 +1,7 @@
<alpha
xmlns:android="http://schemas.android.com/apk/res/android"
android:interpolator="@android:interpolator/decelerate_quad"
android:fromAlpha="0.0"
android:toAlpha="1.0"
android:startOffset="150"
android:duration="@android:integer/config_shortAnimTime" />

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/* //device/apps/common/res/anim/fade_out.xml
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false">
<scale android:interpolator="@android:interpolator/decelerate_quint"
android:fromXScale="1.0" android:toXScale="0.9"
android:fromYScale="1.0" android:toYScale="0.9"
android:pivotX="50%" android:pivotY="0%"
android:duration="220" />
<alpha android:interpolator="@android:interpolator/decelerate_cubic"
android:fromAlpha="1.0" android:toAlpha="0.0"
android:duration="150" />
</set>

View File

@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:duration="@integer/reaction_scrubber_hide_duration"
android:interpolator="@android:anim/decelerate_interpolator"
android:propertyName="translationY"
android:valueTo="@dimen/reaction_scrubber_anim_start_translation_y"
android:valueFrom="@dimen/reaction_scrubber_anim_end_translation_y" />
<objectAnimator
android:duration="@integer/reaction_scrubber_hide_duration"
android:interpolator="@android:anim/decelerate_interpolator"
android:propertyName="alpha"
android:valueTo="0"
android:valueFrom="1" />
</set>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<objectAnimator
android:duration="@integer/reaction_scrubber_reveal_duration"
android:startOffset="@integer/reaction_scrubber_reveal_offset"
android:interpolator="@android:anim/linear_interpolator"
android:propertyName="translationY"
android:valueFrom="@dimen/reaction_scrubber_anim_start_translation_y"
android:valueTo="@dimen/reaction_scrubber_anim_end_translation_y" />
<objectAnimator
android:duration="@integer/reaction_scrubber_reveal_duration"
android:startOffset="@integer/reaction_scrubber_reveal_offset"
android:interpolator="@android:anim/linear_interpolator"
android:propertyName="alpha"
android:valueFrom="0"
android:valueTo="1" />
</set>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/signal_icon_tint_tab_selected" android:state_selected="true" />
<item android:color="@color/signal_icon_tint_tab_unselected" />
</selector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_grey_05" />
<stroke android:color="@color/white" android:width="1dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_grey_05" />
<stroke android:color="?colorAccent" android:width="1dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_grey_05" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/text_primary_disabled" />
<size
android:width="48dp"
android:height="2dp" />
</shape>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="@dimen/context_menu_corner_radius" />
<solid android:color="@color/background_dialog" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/button_primary_ripple">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/black" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomLeftRadius="@dimen/context_menu_corner_radius"
android:bottomRightRadius="@dimen/context_menu_corner_radius" />
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/button_primary_ripple">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/black" />
<corners
android:topLeftRadius="0dp"
android:topRightRadius="0dp"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp" />
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/button_primary_ripple">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/black" />
<corners
android:topLeftRadius="@dimen/context_menu_corner_radius"
android:topRightRadius="@dimen/context_menu_corner_radius"
android:bottomLeftRadius="@dimen/context_menu_corner_radius"
android:bottomRightRadius="@dimen/context_menu_corner_radius" />
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple
xmlns:android="http://schemas.android.com/apk/res/android"
android:color="@color/button_primary_ripple">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="@color/black" />
<corners
android:topLeftRadius="@dimen/context_menu_corner_radius"
android:topRightRadius="@dimen/context_menu_corner_radius"
android:bottomLeftRadius="0dp"
android:bottomRightRadius="0dp" />
</shape>
</item>
</ripple>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/react_with_any_background" />
<corners android:radius="30dp" />
</shape>

View File

@@ -0,0 +1,18 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="32"
android:viewportHeight="32">
<path
android:pathData="M16,16m-16,0a16,16 0,1 1,32 0a16,16 0,1 1,-32 0"
android:fillColor="@color/core_grey_05"/>
<path
android:pathData="M8,16m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"
android:fillColor="@color/core_grey_45"/>
<path
android:pathData="M16,16m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"
android:fillColor="@color/core_grey_45"/>
<path
android:pathData="M24,16m-2,0a2,2 0,1 1,4 0a2,2 0,1 1,-4 0"
android:fillColor="@color/core_grey_45"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/signal_icon_tint_tab_selected"
android:pathData="M20,11.25l-14.439,0l1.559,-1.249l5.471,-5.471l-1.061,-1.06l-8.53,8.53l8.53,8.53l1.061,-1.06l-5.471,-5.471l-1.559,-1.249l14.439,0l0,-1.5z"/>
</vector>

View File

@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="?attr/colorControlNormal">
<path
android:fillColor="@android:color/white"
android:pathData="M16.59,7.58L10,14.17l-3.59,-3.58L5,12l5,5 8,-8zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FFFFFFFF"
android:pathData="M22.1,15l-9.5,-9.5c-0.3,-0.3 -0.8,-0.3 -1.1,0L1.9,15L3,16.1l9,-9l9,9L22.1,15z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/inverse_primary"
android:pathData="M12,18.7c-2.1,0 -4.2,-1 -5.5,-2.7c-0.2,-0.3 -0.2,-0.8 0.2,-1.1s0.8,-0.2 1.1,0.2l0,0c1,1.3 2.6,2.1 4.3,2.1c1.7,0 3.3,-0.8 4.3,-2.1c0.2,-0.3 0.7,-0.4 1,-0.2c0,0 0,0 0,0c0.3,0.2 0.4,0.7 0.2,1C16.2,17.6 14.2,18.7 12,18.7zM12,2.5c-5.1,-0.2 -9.3,3.8 -9.5,8.9c0,0.2 0,0.4 0,0.6c-0.2,5.1 3.8,9.3 8.9,9.5c0.2,0 0.4,0 0.6,0c5.1,0.2 9.3,-3.8 9.5,-8.9c0,-0.2 0,-0.4 0,-0.6c0.2,-5.1 -3.8,-9.3 -8.9,-9.5C12.4,2.5 12.2,2.5 12,2.5M12,1c5.9,-0.2 10.8,4.5 11,10.4c0,0.2 0,0.4 0,0.6c0.2,5.9 -4.5,10.8 -10.4,11c-0.2,0 -0.4,0 -0.6,0C6.1,23.2 1.2,18.5 1,12.6c0,-0.2 0,-0.4 0,-0.6C0.8,6.1 5.5,1.2 11.4,1C11.6,1 11.8,1 12,1zM8.5,8C7.7,8 7,8.9 7,10s0.7,2 1.5,2s1.5,-0.9 1.5,-2S9.3,8 8.5,8zM15.5,8C14.7,8 14,8.9 14,10s0.7,2 1.5,2s1.5,-0.9 1.5,-2S16.3,8 15.5,8z"/>
</vector>

View File

@@ -0,0 +1,5 @@
<vector android:height="24dp" android:tint="?android:textColorPrimary"
android:viewportHeight="24" android:viewportWidth="24"
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="@android:color/white" android:pathData="M19,19H5V5h14V19zM3,3v18h18V3H3zM17,15.59L15.59,17L12,13.41L8.41,17L7,15.59L10.59,12L7,8.41L8.41,7L12,10.59L15.59,7L17,8.41L13.41,12L17,15.59z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/signal_icon_tint_tab_selected"
android:pathData="M17.257,16.2 L15.9,15.385a8.022,8.022 0,1 0,-0.519 0.519l0.812,1.353L20.439,21.5 21.5,20.439ZM10,16.5A6.5,6.5 0,1 1,16.5 10,6.508 6.508,0 0,1 10,16.5Z"/>
</vector>

View File

@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="#FF000000"
android:pathData="M20.5,4.5l-1,-1l-7.5,7.4l-7.5,-7.4l-1,1l7.4,7.5l-7.4,7.5l1,1l7.5,-7.4l7.5,7.4l1,-1l-7.4,-7.5z"/>
</vector>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_grey_77" />
<stroke android:color="@color/core_grey_95" android:width="1dp" />
</shape>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_grey_77" />
<stroke android:color="?colorAccent" android:width="1dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="1000dp" />
<solid android:color="@color/core_grey_77" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/transparent_black_15" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/signal_background_primary" />
<corners android:topRightRadius="100dp" android:bottomRightRadius="100dp" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<solid android:color="@color/signal_background_primary" />
<corners android:topLeftRadius="100dp" android:bottomLeftRadius="100dp" />
</shape>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="90"
android:dither="true"
android:startColor="@color/transparent_black"
android:endColor="@color/transparent_black_15" />
</shape>

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<size android:height="1dp"/>
<solid android:color="?android:textColorTertiary"/>
</shape>

View File

@@ -8,6 +8,18 @@
android:layout_height="match_parent"
android:orientation="vertical">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?colorPrimary"
app:contentInsetStart="0dp">
<include android:id="@+id/toolbarContent"
layout="@layout/activity_conversation_v2_action_bar" />
</androidx.appcompat.widget.Toolbar>
<org.thoughtcrime.securesms.conversation.v2.components.OpenGroupGuidelinesView
android:id="@+id/openGroupGuidelinesView"
android:layout_width="match_parent"
@@ -18,6 +30,7 @@
android:id="@+id/conversationRecyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/toolbar"
android:layout_above="@+id/typingIndicatorViewContainer" />
<org.thoughtcrime.securesms.conversation.v2.components.TypingIndicatorViewContainer
@@ -41,6 +54,22 @@
android:layout_alignParentBottom="true"
android:visibility="gone"/>
<FrameLayout
android:id="@+id/reactions_shade"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/reactions_screen_light_shade_color"
android:foreground="@color/reactions_screen_dark_shade_color"
android:visibility="gone"
tools:visibility="visible"/>
<ViewStub
android:id="@+id/conversation_reaction_scrubber_stub"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:inflatedId="@+id/conversation_reaction_scrubber"
android:layout="@layout/conversation_reaction_scrubber"/>
<FrameLayout
android:id="@+id/additionalContentContainer"
android:layout_width="match_parent"

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/context_menu_list"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:minWidth="200dp" />

View File

@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:paddingTop="13dp"
android:paddingBottom="13dp"
android:gravity="center_vertical"
android:background="?selectableItemBackground">
<ImageView
android:id="@+id/context_menu_item_icon"
android:layout_width="24dp"
android:layout_height="24dp"
tools:src="@drawable/ic_message"/>
<TextView
android:id="@+id/context_menu_item_title"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_marginStart="16dp"
tools:text="Archive" />
</LinearLayout>

View File

@@ -0,0 +1,175 @@
<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.conversation.v2.ConversationReactionOverlay 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/conversation_reaction_scrubber"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:elevation="1000dp"
android:visibility="gone"
tools:visibility="visible">
<Space
android:id="@+id/dropdown_anchor"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_gravity="left"
tools:ignore="RtlHardcoded" />
<LinearLayout
android:id="@+id/conversation_item"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal">
<View
android:id="@+id/conversation_item_bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/conversation_item_timestamp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="@dimen/small_spacing"
android:maxLines="1"
android:textSize="11sp" />
</LinearLayout>
<View
android:id="@+id/conversation_reaction_scrubber_background"
android:layout_width="@dimen/reaction_scrubber_width"
android:layout_height="?attr/actionBarSize"
android:layout_marginBottom="40dp"
android:alpha="0"
android:background="@drawable/conversation_reaction_overlay_background"
android:elevation="4dp"
tools:alpha="1" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/conversation_reaction_scrubber_foreground"
android:layout_width="@dimen/reaction_scrubber_width"
android:layout_height="@dimen/conversation_reaction_scrubber_height"
android:clipToPadding="false"
android:elevation="4dp">
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_1"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_outline_disabled_by_default_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_2"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_3"
app:layout_constraintStart_toEndOf="@id/reaction_1"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_outline_disabled_by_default_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_3"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_4"
app:layout_constraintStart_toEndOf="@id/reaction_2"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_outline_disabled_by_default_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_4"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_5"
app:layout_constraintStart_toEndOf="@id/reaction_3"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_outline_disabled_by_default_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_5"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_6"
app:layout_constraintStart_toEndOf="@id/reaction_4"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_outline_disabled_by_default_24" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_6"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reaction_7"
app:layout_constraintStart_toEndOf="@id/reaction_5"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_outline_disabled_by_default_24" />
<View
android:id="@+id/reaction_7_background"
android:layout_width="52dp"
android:layout_height="52dp"
android:alpha="0.5"
android:background="@drawable/reactions_old_background"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="@id/reaction_7"
app:layout_constraintRight_toRightOf="@id/reaction_7"
app:layout_constraintTop_toTopOf="parent" />
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/reaction_7"
android:layout_width="32dp"
android:layout_height="48dp"
android:alpha="0"
android:translationY="@dimen/reaction_scrubber_anim_start_translation_y"
app:forceJumbo="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/reaction_6"
app:layout_constraintTop_toTopOf="parent"
tools:alpha="1"
tools:translationY="0dp"
tools:src="@drawable/ic_plus" />
</androidx.constraintlayout.widget.ConstraintLayout>
</org.thoughtcrime.securesms.conversation.v2.ConversationReactionOverlay>

View File

@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackgroundBorderless"
tools:layout_height="60dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/emoji_image"
android:layout_width="34dp"
android:layout_height="34dp"
android:layout_gravity="center"
android:adjustViewBounds="true"
android:scaleType="fitCenter"
tools:src="@drawable/ic_emoji" />
</FrameLayout>

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/emoji_grid_header_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center_vertical"
android:minHeight="36dp"
android:singleLine="true"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="@color/signal_text_hint"
tools:text="@string/ReactWithAnyEmojiBottomSheetDialogFragment__activities" />

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.AppCompatTextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/ReactWithAnyEmojiBottomSheetDialogFragment__no_results_found"
android:textAppearance="@style/TextAppearance.AppCompat.Body1"
android:textColor="@color/signal_text_secondary" />

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?selectableItemBackgroundBorderless"
tools:layout_height="60dp">
<org.thoughtcrime.securesms.components.emoji.AsciiEmojiView
android:id="@+id/emoji_text"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center" />
</FrameLayout>

View File

@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
tools:viewBindingIgnore="true"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
tools:parentTag="androidx.constraintlayout.widget.ConstraintLayout">
<FrameLayout
android:id="@+id/emoji_search_nav"
android:layout_width="45dp"
android:layout_height="0dp"
android:layout_marginStart="16dp"
android:background="@drawable/search_bar_start"
android:paddingStart="7dp"
app:layout_constraintBottom_toBottomOf="@id/emoji_search_entry"
app:layout_constraintEnd_toStartOf="@id/emoji_search_entry"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/emoji_search_entry"
tools:ignore="RtlSymmetry">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/emoji_search_nav_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless"
android:clickable="false"
android:contentDescription="@string/KeyboardPagerfragment_back_to_emoji"
android:scaleType="centerInside"
app:srcCompat="@drawable/ic_search_24"
app:tint="@color/signal_icon_tint_tab_selected" />
</FrameLayout>
<FrameLayout
android:id="@+id/emoji_search_clear"
android:layout_width="45dp"
android:layout_height="0dp"
android:layout_marginEnd="16dp"
android:background="@drawable/search_bar_end"
android:paddingEnd="7dp"
app:layout_constraintBottom_toBottomOf="@id/emoji_search_entry"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/emoji_search_entry"
app:layout_constraintTop_toTopOf="@id/emoji_search_entry"
tools:ignore="RtlSymmetry">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/emoji_search_clear_icon"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?selectableItemBackgroundBorderless"
android:clickable="false"
android:contentDescription="@string/KeyboardPagerfragment_clear_search_entry"
android:scaleType="centerInside"
app:tint="@color/signal_icon_tint_tab_selected"
tools:srcCompat="@drawable/ic_x" />
</FrameLayout>
<org.thoughtcrime.securesms.components.emoji.EmojiEditText
android:id="@+id/emoji_search_entry"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:background="@color/signal_background_primary"
android:inputType="textNoSuggestions"
android:maxLines="1"
android:minHeight="40dp"
android:paddingStart="7dp"
android:paddingEnd="7dp"
android:textSize="16sp"
app:layout_constraintEnd_toStartOf="@id/emoji_search_clear"
app:layout_constraintStart_toEndOf="@id/emoji_search_nav"
app:layout_constraintTop_toTopOf="parent"
tools:hint="@string/KeyboardPagerFragment_search_emoji" />
<FrameLayout
android:id="@+id/keyboard_search_click_only"
android:layout_width="match_parent"
android:layout_height="0dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</merge>

View File

@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout 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/react_with_any_emoji_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<ImageView
android:id="@+id/react_with_any_emoji_pull_bar"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_gravity="center_horizontal"
android:src="@drawable/bottom_sheet_handle"
tools:ignore="ContentDescription" />
<org.thoughtcrime.securesms.keyboard.emoji.KeyboardPageSearchView
android:id="@+id/react_with_any_emoji_search"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:paddingTop="12dp"
android:paddingBottom="8dp"
app:search_bar_tint="@color/react_with_any_search_background"
app:search_hint="@string/KeyboardPagerFragment_search_emoji"
app:search_icon_tint="@color/react_with_any_search_hint"
app:show_always="true" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:minHeight="1000dp">
<org.thoughtcrime.securesms.components.emoji.EmojiPageView
android:id="@+id/react_with_any_emoji_page_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="-2dp"
android:clipToPadding="false"
android:paddingStart="5dp"
android:paddingEnd="5dp"
android:paddingBottom="64dp" />
<View
android:id="@+id/react_with_any_emoji_top_shadow"
android:layout_width="match_parent"
android:layout_height="2dp"
android:alpha="0"
android:background="@drawable/toolbar_shadow" />
</FrameLayout>
</LinearLayout>

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="0dp"
android:background="@color/reactions_screen_light_shade_color"
android:foreground="@color/reactions_screen_dark_shade_color"
android:fitsSystemWindows="true" />

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/reactions_bottom_view_parent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:minHeight="340dp"
android:orientation="vertical"
android:paddingBottom="@dimen/react_with_any_emoji_bottom_sheet_dialog_fragment_tabs_height">
<com.google.android.material.tabs.TabLayout
android:id="@+id/emoji_tabs"
android:layout_width="match_parent"
android:layout_height="@dimen/react_with_any_emoji_bottom_sheet_dialog_fragment_tabs_height"
android:layout_gravity="bottom"
app:tabIndicator="@null"
app:tabMinWidth="48dp"
app:tabMode="scrollable"
app:tabPaddingEnd="5dp"
app:tabPaddingStart="5dp"
/>
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/reactions_bottom_view_recipient_pager"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
</LinearLayout>

View File

@@ -0,0 +1,50 @@
<?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="52dp">
<include layout="@layout/view_profile_picture"
android:id="@+id/reactions_bottom_view_avatar"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_margin="@dimen/small_spacing"
android:layout_width="@dimen/very_small_profile_picture_size"
android:layout_height="@dimen/very_small_profile_picture_size"/>
<org.thoughtcrime.securesms.components.FromTextView
android:id="@+id/reactions_bottom_view_recipient_name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:ellipsize="end"
android:gravity="center_vertical"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.AppCompat.Body2"
android:textColor="?android:textColorPrimary"
app:layout_constrainedWidth="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/reactions_bottom_view_recipient_remove"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/reactions_bottom_view_avatar"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
<ImageView
android:id="@+id/reactions_bottom_view_recipient_remove"
android:layout_width="@dimen/large_spacing"
android:layout_height="@dimen/large_spacing"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:gravity="center"
android:src="@drawable/ic_close_white_48dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:scaleType="centerInside"
app:tint="?android:textColorPrimary" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.recyclerview.widget.RecyclerView 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/reactions_bottom_view_recipient_recycler"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:paddingTop="8dp"
android:paddingBottom="8dp"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
tools:listitem="@layout/reactions_bottom_sheet_dialog_fragment_recipient_item" />

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center_horizontal"
android:padding="@dimen/small_spacing"
android:id="@+id/footer_view_emoji_count"
android:layout_weight="1" />

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_gravity="top"
android:alpha="0.3"
android:layout_marginHorizontal="@dimen/small_spacing"
android:background="?android:textColorTertiary"
android:layout_width="match_parent"
android:layout_height="1dp"/>
<LinearLayout android:layout_height="wrap_content"
android:orientation="horizontal"
android:layout_width="match_parent"
android:layout_marginHorizontal="@dimen/medium_spacing"
android:padding="@dimen/small_spacing">
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:id="@+id/header_view_emoji"
android:layout_width="20dp"
android:layout_height="20dp"
android:layout_marginEnd="4dp"
android:gravity="center"
android:textStyle="bold"
app:emoji_forceCustom="true" />
<TextView
android:id="@+id/header_view_emoji_count"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="wrap_content"/>
<TextView
android:text="@string/message_requests_clear_all"
android:textColor="@color/destructive"
android:visibility="gone"
android:id="@+id/header_view_clear_all"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</FrameLayout>

View File

@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal"
android:layout_width="wrap_content"
android:layout_height="26dp"
android:paddingStart="7dp"
android:paddingEnd="7dp"
android:gravity="center">
<org.thoughtcrime.securesms.components.emoji.EmojiImageView
android:scaleType="centerInside"
android:id="@+id/reactions_pill_emoji"
android:layout_width="17dp"
android:layout_height="17dp" />
<Space
android:id="@+id/reactions_pill_spacer"
android:layout_width="4dp"
android:layout_height="wrap_content" />
<TextView
android:id="@+id/reactions_pill_count"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:paddingBottom="5dp"
android:textSize="12dp"
android:fontFamily="sans-serif-medium"
android:textColor="@color/reactions_pill_text_color"
tools:text="23"
tools:ignore="SpUsage" />
</LinearLayout>

View File

@@ -124,10 +124,10 @@
android:id="@+id/snippetTextView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:maxLines="1"
android:ellipsize="end"
android:textSize="@dimen/medium_font_size"
android:maxLines="1"
android:textColor="@color/text"
android:textSize="@dimen/medium_font_size"
tools:text="Sorry, gotta go fight crime again" />
<org.thoughtcrime.securesms.conversation.v2.components.TypingIndicatorView

View File

@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:padding="@dimen/small_spacing"
android:gravity="center">
<FrameLayout
android:id="@+id/layout_flex_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintWidth_max="240dp"
app:layout_constraintEnd_toEndOf="parent">
<com.google.android.flexbox.FlexboxLayout
android:id="@+id/layout_emoji_container"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:flexDirection="row"
app:flexWrap="wrap"
app:alignItems="center"
android:layout_gravity="center"
/>
</FrameLayout>
<ImageView
android:id="@+id/image_view_show_less"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginVertical="@dimen/small_spacing"
android:layout_marginEnd="1dp"
android:scaleType="centerInside"
android:src="?emoji_show_less_icon"
tools:visibility="visible"
app:layout_constraintTop_toTopOf="@+id/text_view_show_less"
app:layout_constraintBottom_toBottomOf="@+id/text_view_show_less"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/text_view_show_less"/>
<TextView
android:id="@+id/text_view_show_less"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/small_spacing"
android:layout_marginStart="1dp"
android:text="@string/ReactionsConversationView_show_less"
android:textSize="@dimen/very_small_font_size"
android:textColor="@color/text"
tools:visibility="visible"
app:layout_constraintStart_toEndOf="@id/image_view_show_less"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@+id/layout_flex_container"
app:layout_constraintBottom_toBottomOf="parent"
/>
<androidx.constraintlayout.widget.Group
android:id="@+id/group_show_less"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:constraint_referenced_ids="image_view_show_less, text_view_show_less"/>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -11,49 +11,50 @@
android:id="@+id/dateBreakTextView"
android:layout_width="match_parent"
android:layout_height="@dimen/large_spacing"
tools:text="@tools:sample/date/hhmmss"
android:gravity="center"
android:textColor="@color/text"
android:textSize="@dimen/very_small_font_size"
android:textStyle="bold" />
android:textStyle="bold"
tools:text="@tools:sample/date/hhmmss" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/mainContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="bottom">
android:gravity="bottom"
android:paddingBottom="@dimen/small_spacing">
<View
android:id="@+id/startSpacing"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
android:layout_width="8dp"
android:layout_height="1dp"/>
android:layout_height="1dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<include
tools:visibility="visible"
android:id="@+id/profilePictureView"
layout="@layout/view_profile_picture"
android:layout_marginBottom="@dimen/small_spacing"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toEndOf="@+id/startSpacing"
app:layout_constraintEnd_toStartOf="@+id/expirationTimerViewContainer"
android:layout_marginEnd="@dimen/small_spacing"
android:layout_width="@dimen/very_small_profile_picture_size"
android:layout_height="@dimen/very_small_profile_picture_size"
android:layout_gravity="center" />
android:layout_gravity="center"
app:layout_constraintEnd_toStartOf="@+id/messageInnerContainer"
app:layout_constraintBottom_toBottomOf="@id/messageInnerContainer"
app:layout_constraintStart_toEndOf="@+id/startSpacing"
tools:visibility="visible" />
<ImageView
tools:visibility="visible"
android:visibility="gone"
android:id="@+id/moderatorIconImageView"
android:layout_width="16dp"
android:layout_height="16dp"
app:layout_constraintBottom_toBottomOf="@+id/profilePictureView"
app:layout_constraintEnd_toEndOf="@+id/profilePictureView"
android:layout_marginEnd="-4dp"
android:layout_marginBottom="-4dp"
android:src="@drawable/ic_crown" />
android:src="@drawable/ic_crown"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@+id/profilePictureView"
app:layout_constraintEnd_toEndOf="@+id/profilePictureView"
tools:visibility="visible" />
<TextView
android:id="@+id/senderNameTextView"
@@ -63,15 +64,15 @@
android:layout_marginEnd="12dp"
android:ellipsize="end"
android:maxLines="1"
android:paddingBottom="4dp"
android:textColor="@color/text"
android:textStyle="bold"
tools:text="@tools:sample/full_names"
android:paddingBottom="4dp"
app:layout_constraintStart_toStartOf="@+id/expirationTimerViewContainer"
app:layout_constraintTop_toTopOf="parent"/>
app:layout_constraintStart_toStartOf="@+id/messageInnerContainer"
app:layout_constraintTop_toTopOf="parent"
tools:text="@tools:sample/full_names" />
<LinearLayout
android:id="@+id/expirationTimerViewContainer"
android:id="@+id/messageInnerContainer"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="horizontal"
@@ -83,33 +84,41 @@
<org.thoughtcrime.securesms.conversation.v2.messages.VisibleMessageContentView
android:id="@+id/messageContentView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
android:layout_height="wrap_content" />
<org.thoughtcrime.securesms.conversation.v2.components.ExpirationTimerView
tools:visibility="visible"
android:visibility="invisible"
android:id="@+id/expirationTimerView"
android:layout_width="12dp"
android:layout_height="12dp"
android:layout_gravity="center_vertical"
android:layout_marginHorizontal="@dimen/small_spacing" />
android:layout_marginHorizontal="@dimen/small_spacing"
android:visibility="invisible"
tools:visibility="visible" />
<View
android:id="@+id/messageContentSpacing"
android:minWidth="@dimen/very_large_spacing"
android:layout_weight="1"
android:layout_width="0dp"
android:layout_height="0dp"/>
android:layout_height="0dp"
android:layout_weight="1"
android:minWidth="@dimen/very_large_spacing" />
</LinearLayout>
<org.thoughtcrime.securesms.conversation.v2.messages.EmojiReactionsView
android:id="@+id/emojiReactionsView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
app:layout_constraintEnd_toStartOf="@+id/messageTimestampContainer"
app:layout_constraintStart_toStartOf="@+id/messageInnerContainer"
app:layout_constraintTop_toBottomOf="@id/messageInnerContainer" />
<RelativeLayout
android:id="@+id/messageTimestampContainer"
android:layout_width="@dimen/medium_spacing"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintBottom_toBottomOf="@+id/expirationTimerViewContainer">
app:layout_constraintBottom_toBottomOf="@+id/messageInnerContainer">
<ImageView
android:id="@+id/messageStatusImageView"

View File

@@ -26,6 +26,11 @@
android:id="@+id/menu_message_details"
app:showAsAction="never" />
<item
android:title="@string/conversation_context__menu_message_details"
android:id="@+id/menu_context_select_message"
app:showAsAction="never" />
<item
android:title="@string/conversation_context__menu_copy_text"
android:id="@+id/menu_context_copy"

View File

@@ -41,4 +41,51 @@
<color name="app_icon_background">#333132</color>
<color name="progress_bar_background">#0A000000</color>
<color name="quote_not_found_background">#8000E97B</color>
<color name="inverse_primary">@color/core_black</color>
<color name="background_dialog">@color/core_white</color>
<color name="reactions_pill_text_color">@color/core_grey_60</color>
<color name="reactions_pill_selected_text_color">@color/core_grey_75</color>
<color name="reactions_screen_dark_shade_color">@color/transparent_black_70</color>
<color name="reactions_screen_light_shade_color">@color/transparent_white_87</color>
<color name="signal_background_primary">@color/core_white</color>
<color name="signal_background_secondary">@color/core_grey_05</color>
<color name="signal_background_tertiary">@color/core_grey_02</color>
<color name="signal_background_dialog">@color/core_white</color>
<color name="signal_background_dialog_secondary">@color/signal_background_secondary</color>
<color name="signal_text_primary">@color/core_grey_90</color>
<color name="text_primary_disabled">@color/core_grey_25</color>
<color name="signal_text_primary_dialog">@color/core_grey_65</color>
<color name="react_with_any_background">@color/core_white</color>
<color name="react_with_any_search_background">@color/core_grey_05</color>
<color name="react_with_any_search_hint">@color/core_grey_60</color>
<color name="react_with_any_customize_background">@color/core_white</color>
<color name="signal_inverse_transparent">@color/transparent_black</color>
<color name="signal_inverse_transparent_40">@color/transparent_black_40</color>
<color name="signal_icon_tint_tab_selected">@color/core_grey_75</color>
<color name="signal_icon_tint_tab_unselected">@color/core_grey_45</color>
<color name="signal_text_secondary">@color/core_grey_60</color>
<color name="signal_text_selected">@color/core_black</color>
<color name="signal_text_hint">@color/core_grey_45</color>
<color name="signal_button_primary_ripple">@color/transparent_black_15</color>
<color name="signal_button_primary_text">@color/core_white</color>
<color name="signal_button_primary_text_disabled">@color/transparent_white_20</color>
<color name="signal_button_secondary">@color/core_grey_05</color>
<color name="signal_button_secondary_text_disabled">@color/core_grey_25</color>
<color name="signal_button_secondary_stroke">@color/core_grey_15</color>
</resources>

View File

@@ -2,6 +2,7 @@
<resources>
<style name="Theme.Session.Light" parent="Base.Theme.Session">
<item name="theme_type">light</item>
<item name="android:navigationBarColor">?android:navigationBarColor</item>
<item name="android:textColorHint">@color/gray50</item>
@@ -34,6 +35,7 @@
<item name="conversation_item_audio_seek_bar_color_incoming">@color/accent</item>
<item name="conversation_item_audio_seek_bar_color_outgoing">@color/white</item>
<item name="emoji_show_less_icon">@drawable/ic_chevron_up</item>
</style>
<style name="Theme.Session.DayNight" parent="Theme.Session.Light">

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="ConversationContextMenuAnimation" parent="@android:style/Animation">
<item name="android:windowEnterAnimation">@anim/delay_fade_in</item>
<item name="android:windowExitAnimation">@anim/shrink_fade_out</item>
</style>
</resources>

View File

@@ -69,6 +69,7 @@
<attr name="emoji_category_flags" format="reference"/>
<attr name="emoji_category_emoticons" format="reference"/>
<attr name="emoji_variation_selector_background" format="reference|color" />
<attr name="emoji_show_less_icon" format="reference|color" />
<attr name="quick_camera_icon" format="reference"/>
<attr name="quick_mic_icon" format="reference"/>
@@ -108,6 +109,7 @@
<attr name="menu_popup_expand" format="reference"/>
<attr name="menu_trash_icon" format="reference" />
<attr name="menu_select_icon" format="reference" />
<attr name="menu_selectall_icon" format="reference" />
<attr name="menu_split_icon" format="reference" />
<attr name="menu_accept_icon" format="reference" />
@@ -214,8 +216,20 @@
</declare-styleable>
<declare-styleable name="EmojiTextView">
<attr name="measureLastLine" format="boolean" />
<attr name="scaleEmojis" format="boolean" />
<attr name="emoji_maxLength" format="integer" />
<attr name="emoji_forceCustom" format="boolean" />
<attr name="emoji_renderMentions" format="boolean" />
<attr name="emoji_forceJumbo" format="boolean" />
</declare-styleable>
<declare-styleable name="EmojiImageView">
<attr name="forceJumbo" format="boolean" />
</declare-styleable>
<declare-styleable name="EmojiReactionsView">
<attr name="erv_outgoing" format="boolean" />
</declare-styleable>
<declare-styleable name="ColorPickerPreference">
@@ -300,4 +314,13 @@
<enum name="bottom" value="3" />
</attr>
</declare-styleable>
<declare-styleable name="KeyboardPageSearchView">
<attr name="show_always" format="boolean" />
<attr name="search_bar_tint" format="color|reference" />
<attr name="search_icon_tint" format="color|reference" />
<attr name="search_hint" format="string|reference" />
<attr name="click_only" format="boolean" />
</declare-styleable>
</resources>

View File

@@ -72,11 +72,14 @@
<color name="gray70">#ff4d4d4d</color>
<color name="gray78">#ff383838</color>
<color name="transparent_black_15">#26000000</color>
<color name="transparent_black_30">#30000000</color>
<color name="transparent_black_40">#40000000</color>
<color name="transparent_black_70">#70000000</color>
<color name="transparent_white_87">#dfffffff</color>
<color name="transparent_black_90">#90000000</color>
<color name="transparent_white_20">#33ffffff</color>
<color name="transparent_white_30">#30ffffff</color>
<color name="transparent_white_40">#40ffffff</color>
<color name="transparent_white_aa">#aaffffff</color>
@@ -96,4 +99,53 @@
<color name="default_background_start">#121212</color>
<color name="default_background_end">#171717</color>
<color name="inverse_primary">@color/core_white</color>
<color name="button_primary_ripple">@color/transparent_black_15</color>
<color name="background_dialog">@color/core_grey_75</color>
<color name="reactions_pill_text_color">@color/core_grey_35</color>
<color name="reactions_pill_selected_text_color">@color/core_grey_15</color>
<color name="reactions_screen_dark_shade_color">@color/transparent_black_70</color>
<color name="reactions_screen_light_shade_color">#df5e5e5e</color>
<color name="signal_background_primary">@color/core_grey_95</color>
<color name="signal_background_secondary">@color/core_grey_75</color>
<color name="signal_background_tertiary">@color/core_grey_90</color>
<color name="signal_background_dialog">@color/core_grey_75</color>
<color name="signal_background_dialog_secondary">@color/core_grey_65</color>
<color name="signal_text_primary">@color/core_grey_05</color>
<color name="text_primary_disabled">@color/core_grey_60</color>
<color name="signal_text_primary_dialog">@color/core_grey_25</color>
<color name="react_with_any_background">@color/core_grey_75</color>
<color name="react_with_any_search_background">@color/core_grey_65</color>
<color name="react_with_any_search_hint">@color/core_grey_25</color>
<color name="react_with_any_customize_background">@color/core_grey_65</color>
<color name="signal_inverse_transparent">@color/transparent</color>
<color name="signal_inverse_transparent_40">@color/transparent_white_40</color>
<color name="signal_icon_tint_tab_selected">@color/core_white</color>
<color name="signal_icon_tint_tab_unselected">@color/core_grey_25</color>
<color name="signal_text_secondary">@color/core_grey_25</color>
<color name="signal_text_selected">@color/core_white</color>
<color name="signal_text_hint">@color/core_grey_15</color>
<color name="signal_button_primary_ripple">@color/transparent_black_15</color>
<color name="signal_button_primary_text">@color/core_white</color>
<color name="signal_button_primary_text_disabled">@color/transparent_white_20</color>
<color name="signal_button_secondary">@color/core_grey_75</color>
<color name="signal_button_secondary_text_disabled">@color/core_grey_45</color>
<color name="signal_button_secondary_stroke">@color/core_grey_45</color>
</resources>

View File

@@ -10,9 +10,12 @@
<color name="core_grey_05">#eeefef</color>
<color name="core_grey_15">#d5d6d6</color>
<color name="core_grey_25">#bbbdbe</color>
<color name="core_grey_35">#9e9e9e</color>
<color name="core_grey_45">#898a8c</color>
<color name="core_grey_60">#6b6d70</color>
<color name="core_grey_65">#525252</color>
<color name="core_grey_75">#3d3e44</color>
<color name="core_grey_77">#2D2D2D</color>
<color name="core_grey_85">#23252a</color>
<color name="core_grey_90">#17191d</color>
<color name="core_grey_95">#0f1012</color>

View File

@@ -128,4 +128,21 @@
<dimen name="action_item_height">56dp</dimen>
<dimen name="conversation_item_quote_width">120dp</dimen>
<dimen name="context_menu_corner_radius">18dp</dimen>
<dimen name="conversation_reaction_scrubber_height">136dp</dimen>
<dimen name="conversation_reaction_touch_deadzone_size">40dp</dimen>
<dimen name="conversation_reaction_scrub_deadzone_distance_from_touch_bottom">30dp</dimen>
<dimen name="conversation_reaction_scrub_vertical_translation">25dp</dimen>
<dimen name="conversation_reaction_scrub_horizontal_margin">16dp</dimen>
<dimen name="reaction_scrubber_anim_start_translation_y">25dp</dimen>
<dimen name="reaction_scrubber_anim_end_translation_y">0dp</dimen>
<dimen name="reaction_scrubber_width">320dp</dimen>
<dimen name="keyboard_toolbar_height">44dp</dimen>
<dimen name="react_with_any_emoji_bottom_sheet_dialog_fragment_min_height">390dp</dimen>
<dimen name="react_with_any_emoji_bottom_sheet_dialog_fragment_tabs_height">40dp</dimen>
</resources>

View File

@@ -1,4 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="play_button_animation_duration">300</integer>
<integer name="reaction_scrubber_reveal_duration">200</integer>
<integer name="reaction_scrubber_reveal_offset">100</integer>
<integer name="reaction_scrubber_hide_duration">150</integer>
<integer name="reaction_scrubber_emoji_reveal_duration_start_delay_factor">10</integer>
</resources>

View File

@@ -562,8 +562,10 @@
<string name="conversation_context__menu_ban_user">Ban user</string>
<string name="conversation_context__menu_ban_and_delete_all">Ban and delete all</string>
<string name="conversation_context__menu_resend_message">Resend message</string>
<string name="conversation_context__menu_reply">Reply</string>
<string name="conversation_context__menu_reply_to_message">Reply to message</string>
<string name="conversation_context__menu_call">Call</string>
<string name="conversation_context__menu_select">Select</string>
<!-- conversation_context_image -->
<string name="conversation_context_image__save_attachment">Save attachment</string>
@@ -925,4 +927,36 @@
<string name="CallNotificationBuilder_system_notification_message">Having notifications disabled will prevent you from receiving calls, go to Session notification settings?</string>
<string name="dismiss">Dismiss</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__this_message">This Message</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__recently_used">Recently Used</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__smileys_and_people">Smileys &amp; People</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__nature">Nature</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__food">Food</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__activities">Activities</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__places">Places</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__objects">Objects</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__symbols">Symbols</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__flags">Flags</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__emoticons">Emoticons</string>
<string name="ReactWithAnyEmojiBottomSheetDialogFragment__no_results_found">No results found</string>
<!-- ReactionsBottomSheetDialogFragment -->
<string name="ReactionsBottomSheetDialogFragment_all">All &#183; %1$d</string>
<!-- ReactionsConversationView -->
<string name="ReactionsConversationView_plus">+%1$d</string>
<!-- ReactionsRecipientAdapter -->
<string name="ReactionsRecipientAdapter_you">You</string>
<string name="reaction_notification">%1$s reacted to a message %2$s</string>
<string name="ReactionsConversationView_show_less">Show less</string>
<string name="KeyboardPagerFragment_search_emoji">Search emoji</string>
<string name="KeyboardPagerfragment_back_to_emoji">Back to emoji</string>
<string name="KeyboardPagerfragment_clear_search_entry">Clear search entry</string>
<plurals name="ReactionsRecipientAdapter_other_reactors">
<item quantity="one">And %1$d other has reacted %2$s to this message</item>
<item quantity="other">And %1$d others have reacted %2$s to this message</item>
</plurals>
</resources>

View File

@@ -264,4 +264,8 @@
<item name="android:foreground">?attr/selectableItemBackground</item>
</style>
<style name="PopupMenu.ConversationItem" parent="@style/Widget.AppCompat.PopupMenu">
<item name="android:dropDownHorizontalOffset">@dimen/medium_spacing</item>
</style>
</resources>

View File

@@ -3,6 +3,7 @@
<!-- The base theme is dark and the light one is implemented using "notnight" resources. -->
<style name="Base.Theme.Session" parent="@style/Theme.AppCompat.DayNight.DarkActionBar">
<item name="theme_type">dark</item>
<item name="colorPrimary">@color/action_bar_background</item>
<item name="colorPrimaryDark">@color/action_bar_background</item>
<item name="searchBackgroundColor">#1B1B1B</item>
@@ -75,6 +76,7 @@
<item name="menu_delete_icon">@drawable/ic_baseline_delete_24</item>
<item name="menu_copy_icon">@drawable/ic_baseline_file_copy_24</item>
<item name="menu_reply_icon">@drawable/ic_baseline_reply_24</item>
<item name="menu_select_icon">@drawable/ic_baseline_check_circle_outline_24</item>
<item name="menu_selectall_icon">@drawable/ic_baseline_select_all_24</item>
<item name="menu_split_icon">@drawable/ic_baseline_call_split_24</item>
<item name="menu_popup_expand">@drawable/ic_baseline_launch_24</item>
@@ -97,6 +99,7 @@
<item name="conversation_pinned_background_color">@color/conversation_pinned_background</item>
<item name="conversation_pinned_icon_color">@color/conversation_pinned_icon</item>
<item name="emoji_show_less_icon">@drawable/ic_chevron_up_light</item>
</style>
<!-- This should be the default theme for the application. -->
@@ -296,4 +299,57 @@
<item name="android:windowNoTitle">true</item>
</style>
<style name="Theme.TextSecure.Light.BottomSheetDialog" parent="Theme.Design.Light.BottomSheetDialog">
</style>
<style name="Theme.TextSecure.Light.BottomSheetDialog.Fixed">
<item name="android:windowIsFloating">false</item>
</style>
<style name="Theme.TextSecure.BottomSheetDialog.Fixed" parent="Theme.Design.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
</style>
<style name="Theme.TextSecure.BottomSheetDialog.Fixed.ReactWithAny">
<item name="bottomSheetStyle">@style/Widget.TextSecure.BottomSheet.ReactWithAny</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="Theme.TextSecure.BottomSheetDialog.Fixed.ReactWithAny.Shadowless">
<item name="android:backgroundDimEnabled">false</item>
</style>
<style name="Widget.TextSecure.BottomSheet.ReactWithAny" parent="Widget.MaterialComponents.BottomSheet">
<item name="backgroundTint">@color/core_grey_95</item>
<item name="behavior_peekHeight">@dimen/react_with_any_emoji_bottom_sheet_dialog_fragment_min_height</item>
</style>
<style name="Theme.TextSecure.Light.BottomSheetDialog.Fixed.ReactWithAny">
<item name="bottomSheetStyle">@style/Widget.TextSecure.BottomSheet.ReactWithAny.Light</item>
<item name="android:backgroundDimEnabled">true</item>
</style>
<style name="Widget.TextSecure.BottomSheet.ReactWithAny.Light">
<item name="backgroundTint">@color/white</item>
</style>
<style name="Widget.TextSecure.ReactWithAny" parent="ThemeOverlay.MaterialComponents.BottomSheetDialog">
<item name="android:windowIsFloating">false</item>
<item name="android:windowSoftInputMode">adjustResize</item>
<item name="bottomSheetStyle">@style/Widget.TextSecure.ReactWithAny.BottomSheet</item>
</style>
<style name="Widget.TextSecure.ReactWithAny.BottomSheet" parent="Widget.MaterialComponents.BottomSheet">
<item name="shapeAppearanceOverlay">@style/ShapeAppearanceOverlay.TextSecure.BottomSheet.Rounded</item>
<item name="backgroundTint">@color/react_with_any_background</item>
</style>
<style name="ShapeAppearanceOverlay.TextSecure.BottomSheet.Rounded" parent="">
<item name="cornerFamily">rounded</item>
<item name="cornerSizeTopRight">18dp</item>
<item name="cornerSizeTopLeft">18dp</item>
<item name="cornerSizeBottomLeft">0dp</item>
<item name="cornerSizeBottomRight">0dp</item>
</style>
</resources>