Add initial support for Group Calling.

This commit is contained in:
Cody Henthorne
2020-11-11 15:11:03 -05:00
parent 696fffb603
commit b1f6786392
53 changed files with 1887 additions and 130 deletions

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/core_white" android:state_enabled="true" />
<item android:color="@color/transparent_white_40" />
</selector>

View File

@@ -9,14 +9,12 @@
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/call_participant_item_avatar"
android:layout_width="0dp"
android:layout_height="0dp"
android:layout_width="112dp"
android:layout_height="112dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="h,1:1"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintWidth_percent="0.5"
tools:srcCompat="@tools:sample/avatars" />
<ImageView

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout 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="wrap_content"
android:layout_height="wrap_content"
android:background="@color/black"
tools:layout_height="match_parent"
tools:layout_width="match_parent">
<androidx.cardview.widget.CardView
android:id="@+id/group_call_participant_card_wrapper"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@null"
android:clipChildren="true"
app:cardCornerRadius="10dp">
<include
android:id="@+id/group_call_participant"
layout="@layout/call_participant_item"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.cardview.widget.CardView>
</FrameLayout>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Space xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="72dp"
android:layout_width="40dp"
android:layout_height="72dp"
tools:background="@color/red"
tools:visibility="visible" />

View File

@@ -4,6 +4,9 @@
android:id="@+id/call_screen_call_participants"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
app:alignContent="stretch"
app:alignItems="stretch"
app:flexDirection="row"
app:flexWrap="wrap" />
app:flexWrap="wrap"
app:justifyContent="flex_start" />

View File

@@ -4,12 +4,6 @@
xmlns:tools="http://schemas.android.com/tools"
tools:parentTag="org.thoughtcrime.securesms.components.webrtc.WebRtcCallView">
<View
android:id="@+id/call_screen_blur_overlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent_black_40" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/call_screen_participants_parent"
android:layout_width="match_parent"
@@ -316,7 +310,7 @@
android:layout_weight="1"
android:text="@string/WebRtcCallView__start_call"
android:textAllCaps="false"
android:textColor="@color/core_white"
android:textColor="@color/core_green_text_button"
app:backgroundTint="@color/core_green" />
</LinearLayout>

View File

@@ -3,11 +3,10 @@
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:contentInsetStart="0dp">
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
@@ -22,7 +21,9 @@
android:id="@+id/call_screen_recipient_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="end"
android:gravity="center_horizontal"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.Signal.Body1.Bold"
android:textColor="@color/core_white"
app:layout_constraintBottom_toTopOf="@id/action_bar_guideline"
@@ -36,7 +37,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
android:textAppearance="@style/TextAppearance.Signal.Body2"
android:textColor="@color/core_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<item android:title="@string/conversation_callable_secure__menu_video"
android:id="@+id/menu_video_secure"
android:icon="@drawable/ic_video_solid_24"
app:showAsAction="always" />
</menu>

View File

@@ -1332,9 +1332,23 @@
<string name="WebRtcCallView__signal_voice_call">Signal voice call…</string>
<string name="WebRtcCallView__signal_video_call">Signal video call…</string>
<string name="WebRtcCallView__start_call">Start Call</string>
<string name="WebRtcCallView__group_call">Group Call</string>
<string name="WebRtcCallView__join_call">Join Call</string>
<string name="WebRtcCallView__s_group_call">\"%1$s\" Group Call</string>
<string name="WebRtcCallView__view_participants_list">View participants</string>
<string name="WebRtcCallView__your_video_is_off">Your video is off</string>
<string name="WebRtcCallView__connecting">Connecting…</string>
<string name="WebRtcCallView__reconnecting">Reconnecting…</string>
<string name="WebRtcCallView__joining">Joining…</string>
<string name="WebRtcCallView__disconnected">Disconnected</string>
<string name="WebRtcCallView__no_one_else_is_here">No one else is here</string>
<string name="WebRtcCallView__s_is_in_this_call">%1$s is in this call</string>
<string name="WebRtcCallView__s_and_s_are_in_this_call">%1$s and %2$s are in this call</string>
<plurals name="WebRtcCallView__s_s_and_d_others_are_in_this_call">
<item quantity="one">%1$s, %2$s, and %3$d other are in this call</item>
<item quantity="other">%1$s, %2$s, and %3$d others are in this call</item>
</plurals>
<!-- CallParticipantsListDialog -->
<plurals name="CallParticipantsListDialog_in_this_call_d_people">