Reintroduce labels for incoming call screen.

This commit is contained in:
Alex Hart
2023-03-23 16:10:25 -03:00
parent 454e9a99fc
commit 2763cfe6f4
3 changed files with 51 additions and 2 deletions
@@ -92,6 +92,7 @@ public class WebRtcCallView extends ConstraintLayout {
private ControlsListener controlsListener; private ControlsListener controlsListener;
private RecipientId recipientId; private RecipientId recipientId;
private ImageView answer; private ImageView answer;
private TextView answerWithoutVideoLabel;
private ImageView cameraDirectionToggle; private ImageView cameraDirectionToggle;
private AccessibleToggleButton ringToggle; private AccessibleToggleButton ringToggle;
private PictureInPictureGestureHelper pictureInPictureGestureHelper; private PictureInPictureGestureHelper pictureInPictureGestureHelper;
@@ -173,6 +174,7 @@ public class WebRtcCallView extends ConstraintLayout {
parent = findViewById(R.id.call_screen); parent = findViewById(R.id.call_screen);
participantsParent = findViewById(R.id.call_screen_participants_parent); participantsParent = findViewById(R.id.call_screen_participants_parent);
answer = findViewById(R.id.call_screen_answer_call); answer = findViewById(R.id.call_screen_answer_call);
answerWithoutVideoLabel = findViewById(R.id.call_screen_answer_without_video_label);
cameraDirectionToggle = findViewById(R.id.call_screen_camera_direction_toggle); cameraDirectionToggle = findViewById(R.id.call_screen_camera_direction_toggle);
ringToggle = findViewById(R.id.call_screen_audio_ring_toggle); ringToggle = findViewById(R.id.call_screen_audio_ring_toggle);
hangup = findViewById(R.id.call_screen_end_call); hangup = findViewById(R.id.call_screen_end_call);
@@ -198,6 +200,8 @@ public class WebRtcCallView extends ConstraintLayout {
fullScreenShade = findViewById(R.id.call_screen_full_shade); fullScreenShade = findViewById(R.id.call_screen_full_shade);
View decline = findViewById(R.id.call_screen_decline_call); View decline = findViewById(R.id.call_screen_decline_call);
View answerLabel = findViewById(R.id.call_screen_answer_call_label);
View declineLabel = findViewById(R.id.call_screen_decline_call_label);
callParticipantsPager.setPageTransformer(new MarginPageTransformer(ViewUtil.dpToPx(4))); callParticipantsPager.setPageTransformer(new MarginPageTransformer(ViewUtil.dpToPx(4)));
@@ -222,7 +226,9 @@ public class WebRtcCallView extends ConstraintLayout {
topViews.add(topGradient); topViews.add(topGradient);
incomingCallViews.add(answer); incomingCallViews.add(answer);
incomingCallViews.add(answerLabel);
incomingCallViews.add(decline); incomingCallViews.add(decline);
incomingCallViews.add(declineLabel);
incomingCallViews.add(footerGradient); incomingCallViews.add(footerGradient);
incomingCallViews.add(incomingRingStatus); incomingCallViews.add(incomingRingStatus);
@@ -621,6 +627,7 @@ public class WebRtcCallView extends ConstraintLayout {
if (webRtcControls.displayAnswerWithoutVideo()) { if (webRtcControls.displayAnswerWithoutVideo()) {
visibleViewSet.add(answerWithoutVideo); visibleViewSet.add(answerWithoutVideo);
visibleViewSet.add(answerWithoutVideoLabel);
answer.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.webrtc_call_screen_answer_with_video)); answer.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.webrtc_call_screen_answer_with_video));
} }
@@ -3,7 +3,7 @@
<item android:drawable="@drawable/webrtc_call_screen_circle_grey_selector" /> <item android:drawable="@drawable/webrtc_call_screen_circle_grey_selector" />
<item <item
android:bottom="14dp" android:bottom="14dp"
android:drawable="@drawable/ic_video_off_solid_white_28" android:drawable="@drawable/symbol_video_slash_fill_24"
android:left="14dp" android:left="14dp"
android:right="14dp" android:right="14dp"
android:top="14dp" /> android:top="14dp" />
+43 -1
View File
@@ -325,6 +325,20 @@
app:srcCompat="@drawable/webrtc_call_screen_hangup" app:srcCompat="@drawable/webrtc_call_screen_hangup"
tools:visibility="gone" /> tools:visibility="gone" />
<TextView
android:id="@+id/call_screen_decline_call_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:hyphenationFrequency="normal"
android:text="@string/WebRtcCallScreen__decline"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="@id/call_screen_decline_call"
app:layout_constraintStart_toStartOf="@id/call_screen_decline_call"
app:layout_constraintTop_toBottomOf="@id/call_screen_decline_call"
tools:visibility="gone" />
<ImageView <ImageView
android:id="@+id/call_screen_answer_call" android:id="@+id/call_screen_answer_call"
android:layout_width="56dp" android:layout_width="56dp"
@@ -340,6 +354,20 @@
app:srcCompat="@drawable/webrtc_call_screen_answer" app:srcCompat="@drawable/webrtc_call_screen_answer"
tools:visibility="gone" /> tools:visibility="gone" />
<TextView
android:id="@+id/call_screen_answer_call_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:hyphenationFrequency="normal"
android:text="@string/WebRtcCallScreen__answer"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="@id/call_screen_answer_call"
app:layout_constraintStart_toStartOf="@id/call_screen_answer_call"
app:layout_constraintTop_toBottomOf="@id/call_screen_answer_call"
tools:visibility="gone" />
<ImageView <ImageView
android:id="@+id/call_screen_answer_without_video" android:id="@+id/call_screen_answer_without_video"
android:layout_width="56dp" android:layout_width="56dp"
@@ -347,12 +375,26 @@
android:layout_marginBottom="5dp" android:layout_marginBottom="5dp"
android:contentDescription="@string/WebRtcCallScreen__answer_without_video" android:contentDescription="@string/WebRtcCallScreen__answer_without_video"
android:visibility="gone" android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_answer_call" app:layout_constraintBottom_toTopOf="@id/call_screen_answer_without_video_label"
app:layout_constraintEnd_toEndOf="parent" app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/webrtc_call_screen_answer_without_video" app:srcCompat="@drawable/webrtc_call_screen_answer_without_video"
tools:visibility="gone" /> tools:visibility="gone" />
<TextView
android:id="@+id/call_screen_answer_without_video_label"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="9dp"
android:hyphenationFrequency="normal"
android:text="@string/WebRtcCallScreen__answer_without_video"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_answer_call"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
tools:visibility="gone" />
<LinearLayout <LinearLayout
android:id="@+id/call_screen_start_call_controls" android:id="@+id/call_screen_start_call_controls"
android:layout_width="match_parent" android:layout_width="match_parent"