Update call UI to new designs.

fork-5.53.8
Cody Henthorne 2021-08-09 11:56:06 -04:00
rodzic 94b9a458e7
commit 655e43a079
16 zmienionych plików z 441 dodań i 201 usunięć

Wyświetl plik

@ -17,8 +17,6 @@
package org.thoughtcrime.securesms;
import static org.thoughtcrime.securesms.components.sensors.Orientation.PORTRAIT_BOTTOM_EDGE;
import android.Manifest;
import android.annotation.SuppressLint;
import android.app.PictureInPictureParams;
@ -82,6 +80,8 @@ import org.whispersystems.signalservice.api.messages.calls.HangupMessage;
import java.util.List;
import java.util.Optional;
import static org.thoughtcrime.securesms.components.sensors.Orientation.PORTRAIT_BOTTOM_EDGE;
public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChangeDialog.Callback {
private static final String TAG = Log.tag(WebRtcCallActivity.class);
@ -772,7 +772,7 @@ public class WebRtcCallActivity extends BaseActivity implements SafetyNumberChan
setRequestedOrientation(feature.isPresent() ? ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED : ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
if (feature.isPresent()) {
FoldingFeature foldingFeature = (FoldingFeature) feature.get();
Rect bounds = foldingFeature.getBounds();
Rect bounds = foldingFeature.getBounds();
if (foldingFeature.getState() == FoldingFeature.State.HALF_OPENED && bounds.top == bounds.bottom) {
Log.d(TAG, "OnWindowLayoutInfo accepted: ensure call view is in table-top display mode");
viewModel.setFoldableState(WebRtcControls.FoldableState.folded(bounds.top));

Wyświetl plik

@ -196,6 +196,14 @@ public class CallParticipantView extends ConstraintLayout {
pipAvatar.setVisibility(shouldRenderInPip ? View.VISIBLE : View.GONE);
}
void hideAvatar() {
avatar.setAlpha(0f);
}
void showAvatar() {
avatar.setAlpha(1f);
}
void useLargeAvatar() {
changeAvatarParams(LARGE_AVATAR);
}

Wyświetl plik

@ -34,6 +34,7 @@ public class CallParticipantsLayout extends FlexboxLayout {
private CallParticipant focusedParticipant = null;
private boolean shouldRenderInPip;
private boolean isPortrait;
private boolean isIncomingRing;
private LayoutStrategy layoutStrategy;
public CallParticipantsLayout(@NonNull Context context) {
@ -52,13 +53,16 @@ public class CallParticipantsLayout extends FlexboxLayout {
@NonNull CallParticipant focusedParticipant,
boolean shouldRenderInPip,
boolean isPortrait,
boolean isIncomingRing,
@NonNull LayoutStrategy layoutStrategy)
{
this.callParticipants = callParticipants;
this.focusedParticipant = focusedParticipant;
this.shouldRenderInPip = shouldRenderInPip;
this.isPortrait = isPortrait;
this.isIncomingRing = isIncomingRing;
this.layoutStrategy = layoutStrategy;
setFlexDirection(layoutStrategy.getFlexDirection());
updateLayout();
}
@ -125,6 +129,12 @@ public class CallParticipantsLayout extends FlexboxLayout {
cardView.setRadius(0);
}
if (isIncomingRing) {
callParticipantView.hideAvatar();
} else {
callParticipantView.showAvatar();
}
if (count > 2) {
callParticipantView.useSmallAvatar();
} else {

Wyświetl plik

@ -197,6 +197,10 @@ public final class CallParticipantsState {
.or(() -> includeSelf ? OptionalLong.of(1L) : OptionalLong.empty());
}
public boolean isIncomingRing() {
return callState == WebRtcViewModel.State.CALL_INCOMING;
}
public static @NonNull CallParticipantsState update(@NonNull CallParticipantsState oldState,
@NonNull WebRtcViewModel webRtcViewModel,
boolean enableVideo)

Wyświetl plik

@ -16,14 +16,16 @@ class WebRtcCallParticipantsPage {
private final boolean isRenderInPip;
private final boolean isPortrait;
private final boolean isLandscapeEnabled;
private final boolean isIncomingRing;
static WebRtcCallParticipantsPage forMultipleParticipants(@NonNull List<CallParticipant> callParticipants,
@NonNull CallParticipant focusedParticipant,
boolean isRenderInPip,
boolean isPortrait,
boolean isLandscapeEnabled)
boolean isLandscapeEnabled,
boolean isIncomingRing)
{
return new WebRtcCallParticipantsPage(callParticipants, focusedParticipant, false, isRenderInPip, isPortrait, isLandscapeEnabled);
return new WebRtcCallParticipantsPage(callParticipants, focusedParticipant, false, isRenderInPip, isPortrait, isLandscapeEnabled, isIncomingRing);
}
static WebRtcCallParticipantsPage forSingleParticipant(@NonNull CallParticipant singleParticipant,
@ -31,7 +33,7 @@ class WebRtcCallParticipantsPage {
boolean isPortrait,
boolean isLandscapeEnabled)
{
return new WebRtcCallParticipantsPage(Collections.singletonList(singleParticipant), singleParticipant, true, isRenderInPip, isPortrait, isLandscapeEnabled);
return new WebRtcCallParticipantsPage(Collections.singletonList(singleParticipant), singleParticipant, true, isRenderInPip, isPortrait, isLandscapeEnabled, false);
}
private WebRtcCallParticipantsPage(@NonNull List<CallParticipant> callParticipants,
@ -39,7 +41,8 @@ class WebRtcCallParticipantsPage {
boolean isSpeaker,
boolean isRenderInPip,
boolean isPortrait,
boolean isLandscapeEnabled)
boolean isLandscapeEnabled,
boolean isIncomingRing)
{
this.callParticipants = callParticipants;
this.focusedParticipant = focusedParticipant;
@ -47,6 +50,7 @@ class WebRtcCallParticipantsPage {
this.isRenderInPip = isRenderInPip;
this.isPortrait = isPortrait;
this.isLandscapeEnabled = isLandscapeEnabled;
this.isIncomingRing = isIncomingRing;
}
public @NonNull List<CallParticipant> getCallParticipants() {
@ -69,6 +73,10 @@ class WebRtcCallParticipantsPage {
return isPortrait;
}
public boolean isIncomingRing() {
return isIncomingRing;
}
public @NonNull CallParticipantsLayout.LayoutStrategy getLayoutStrategy() {
return CallParticipantsLayoutStrategies.getStrategy(isPortrait, isLandscapeEnabled);
}

Wyświetl plik

@ -86,7 +86,7 @@ class WebRtcCallParticipantsPagerAdapter extends ListAdapter<WebRtcCallParticipa
@Override
void bind(WebRtcCallParticipantsPage page) {
callParticipantsLayout.update(page.getCallParticipants(), page.getFocusedParticipant(), page.isRenderInPip(), page.isPortrait(), page.getLayoutStrategy());
callParticipantsLayout.update(page.getCallParticipants(), page.getFocusedParticipant(), page.isRenderInPip(), page.isPortrait(), page.isIncomingRing(), page.getLayoutStrategy());
}
}

Wyświetl plik

@ -6,7 +6,6 @@ import android.graphics.ColorMatrixColorFilter;
import android.graphics.Point;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
@ -17,7 +16,6 @@ import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.content.res.AppCompatResources;
import androidx.appcompat.widget.Toolbar;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.constraintlayout.widget.ConstraintSet;
import androidx.constraintlayout.widget.Guideline;
@ -38,6 +36,7 @@ import com.google.common.collect.Sets;
import org.thoughtcrime.securesms.R;
import org.thoughtcrime.securesms.animation.ResizeAnimation;
import org.thoughtcrime.securesms.components.AccessibleToggleButton;
import org.thoughtcrime.securesms.components.AvatarImageView;
import org.thoughtcrime.securesms.contacts.avatars.ProfileContactPhoto;
import org.thoughtcrime.securesms.events.CallParticipant;
import org.thoughtcrime.securesms.events.WebRtcViewModel;
@ -48,6 +47,7 @@ import org.thoughtcrime.securesms.recipients.RecipientId;
import org.thoughtcrime.securesms.ringrtc.CameraState;
import org.thoughtcrime.securesms.util.BlurTransformation;
import org.thoughtcrime.securesms.util.SetUtil;
import org.thoughtcrime.securesms.util.ThrottledDebouncer;
import org.thoughtcrime.securesms.util.ViewUtil;
import org.thoughtcrime.securesms.util.views.Stub;
import org.thoughtcrime.securesms.webrtc.CallParticipantsViewState;
@ -70,8 +70,11 @@ public class WebRtcCallView extends ConstraintLayout {
public static final int CONTROLS_HEIGHT = 98;
private WebRtcAudioOutputToggleButton audioToggle;
private TextView audioToggleLabel;
private AccessibleToggleButton videoToggle;
private TextView videoToggleLabel;
private AccessibleToggleButton micToggle;
private TextView micToggleLabel;
private ViewGroup smallLocalRenderFrame;
private CallParticipantView smallLocalRender;
private View largeLocalRenderFrame;
@ -80,32 +83,40 @@ public class WebRtcCallView extends ConstraintLayout {
private ImageView largeLocalRenderNoVideoAvatar;
private TextView recipientName;
private TextView status;
private TextView incomingRingStatus;
private ConstraintLayout parent;
private ConstraintLayout participantsParent;
private ControlsListener controlsListener;
private RecipientId recipientId;
private ImageView answer;
private ImageView cameraDirectionToggle;
private TextView cameraDirectionToggleLabel;
private PictureInPictureGestureHelper pictureInPictureGestureHelper;
private ImageView hangup;
private TextView hangupLabel;
private View answerWithAudio;
private View answerWithAudioLabel;
private View topGradient;
private View footerGradient;
private View startCallControls;
private ViewPager2 callParticipantsPager;
private RecyclerView callParticipantsRecycler;
private Toolbar toolbar;
private ConstraintLayout toolbar;
private MaterialButton startCall;
private TextView participantCount;
private Stub<FrameLayout> groupCallSpeakerHint;
private Stub<View> groupCallFullStub;
private View errorButton;
private int pagerBottomMarginDp;
private boolean controlsVisible = true;
private Guideline showParticipantsGuideline;
private Guideline topFoldGuideline;
private Guideline callScreenTopFoldGuideline;
private View foldParticipantCountWrapper;
private TextView foldParticipantCount;
private AvatarImageView largeHeaderAvatar;
private ConstraintSet smallHeaderConstraints;
private Guideline statusBarGuideline;
private View fullScreenShade;
private WebRtcCallParticipantsPagerAdapter pagerAdapter;
private WebRtcCallParticipantsRecyclerAdapter recyclerAdapter;
@ -114,11 +125,14 @@ public class WebRtcCallView extends ConstraintLayout {
private final Set<View> incomingCallViews = new HashSet<>();
private final Set<View> topViews = new HashSet<>();
private final Set<View> visibleViewSet = new HashSet<>();
private final Set<View> allTimeVisibleViews = new HashSet<>();
private final Set<View> adjustableMarginsSet = new HashSet<>();
private final Set<View> rotatableControls = new HashSet<>();
private WebRtcControls controls = WebRtcControls.NONE;
private final Runnable fadeOutRunnable = () -> {
private final ThrottledDebouncer throttledDebouncer = new ThrottledDebouncer(TRANSITION_DURATION_MILLIS);
private WebRtcControls controls = WebRtcControls.NONE;
private final Runnable fadeOutRunnable = () -> {
if (isAttachedToWindow() && controls.isFadeOutEnabled()) fadeOutControls();
};
@ -138,8 +152,11 @@ public class WebRtcCallView extends ConstraintLayout {
super.onFinishInflate();
audioToggle = findViewById(R.id.call_screen_speaker_toggle);
audioToggleLabel = findViewById(R.id.call_screen_speaker_toggle_label);
videoToggle = findViewById(R.id.call_screen_video_toggle);
videoToggleLabel = findViewById(R.id.call_screen_video_toggle_label);
micToggle = findViewById(R.id.call_screen_audio_mic_toggle);
micToggleLabel = findViewById(R.id.call_screen_audio_mic_toggle_label);
smallLocalRenderFrame = findViewById(R.id.call_screen_pip);
smallLocalRender = findViewById(R.id.call_screen_small_local_renderer);
largeLocalRenderFrame = findViewById(R.id.call_screen_large_local_renderer_frame);
@ -148,32 +165,38 @@ public class WebRtcCallView extends ConstraintLayout {
largeLocalRenderNoVideoAvatar = findViewById(R.id.call_screen_large_local_video_off_avatar);
recipientName = findViewById(R.id.call_screen_recipient_name);
status = findViewById(R.id.call_screen_status);
incomingRingStatus = findViewById(R.id.call_screen_incoming_ring_status);
parent = findViewById(R.id.call_screen);
participantsParent = findViewById(R.id.call_screen_participants_parent);
answer = findViewById(R.id.call_screen_answer_call);
cameraDirectionToggle = findViewById(R.id.call_screen_camera_direction_toggle);
cameraDirectionToggleLabel = findViewById(R.id.call_screen_camera_direction_toggle_label);
hangup = findViewById(R.id.call_screen_end_call);
hangupLabel = findViewById(R.id.call_screen_end_call_label);
answerWithAudio = findViewById(R.id.call_screen_answer_with_audio);
answerWithAudioLabel = findViewById(R.id.call_screen_answer_with_audio_label);
topGradient = findViewById(R.id.call_screen_header_gradient);
footerGradient = findViewById(R.id.call_screen_footer_gradient);
startCallControls = findViewById(R.id.call_screen_start_call_controls);
callParticipantsPager = findViewById(R.id.call_screen_participants_pager);
callParticipantsRecycler = findViewById(R.id.call_screen_participants_recycler);
toolbar = findViewById(R.id.call_screen_toolbar);
toolbar = findViewById(R.id.call_screen_header);
startCall = findViewById(R.id.call_screen_start_call_start_call);
errorButton = findViewById(R.id.call_screen_error_cancel);
groupCallSpeakerHint = new Stub<>(findViewById(R.id.call_screen_group_call_speaker_hint));
groupCallFullStub = new Stub<>(findViewById(R.id.group_call_call_full_view));
showParticipantsGuideline = findViewById(R.id.call_screen_show_participants_guideline);
topFoldGuideline = findViewById(R.id.fold_top_guideline);
callScreenTopFoldGuideline = findViewById(R.id.fold_top_call_screen_guideline);
foldParticipantCountWrapper = findViewById(R.id.fold_show_participants_menu_counter_wrapper);
foldParticipantCount = findViewById(R.id.fold_show_participants_menu_counter);
largeHeaderAvatar = findViewById(R.id.call_screen_header_avatar);
statusBarGuideline = findViewById(R.id.call_screen_status_bar_guideline);
fullScreenShade = findViewById(R.id.call_screen_full_shade);
View topGradient = findViewById(R.id.call_screen_header_gradient);
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);
View cancelStartCall = findViewById(R.id.call_screen_start_call_cancel);
callParticipantsPager.setPageTransformer(new MarginPageTransformer(ViewUtil.dpToPx(4)));
@ -239,7 +262,6 @@ public class WebRtcCallView extends ConstraintLayout {
controlsListener.onStartCall(videoToggle.isChecked());
}
});
cancelStartCall.setOnClickListener(v -> runIfNonNull(controlsListener, ControlsListener::onCancelStartCall));
ColorMatrix greyScaleMatrix = new ColorMatrix();
greyScaleMatrix.setSaturation(0);
@ -261,6 +283,9 @@ public class WebRtcCallView extends ConstraintLayout {
rotatableControls.add(cameraDirectionToggle);
rotatableControls.add(decline);
rotatableControls.add(smallLocalRender.findViewById(R.id.call_participant_mic_muted));
smallHeaderConstraints = new ConstraintSet();
smallHeaderConstraints.clone(getContext(), R.layout.webrtc_call_view_header_small);
}
@Override
@ -274,7 +299,6 @@ public class WebRtcCallView extends ConstraintLayout {
@Override
protected boolean fitSystemWindows(Rect insets) {
Guideline statusBarGuideline = findViewById(R.id.call_screen_status_bar_guideline);
Guideline navigationBarGuideline = findViewById(R.id.call_screen_navigation_bar_guideline);
statusBarGuideline.setGuidelineBegin(insets.top);
@ -327,27 +351,22 @@ public class WebRtcCallView extends ConstraintLayout {
List<WebRtcCallParticipantsPage> pages = new ArrayList<>(2);
if (!state.getGridParticipants().isEmpty()) {
pages.add(WebRtcCallParticipantsPage.forMultipleParticipants(state.getGridParticipants(), state.getFocusedParticipant(), state.isInPipMode(), isPortrait, isLandscapeEnabled));
pages.add(WebRtcCallParticipantsPage.forMultipleParticipants(state.getGridParticipants(), state.getFocusedParticipant(), state.isInPipMode(), isPortrait, isLandscapeEnabled, state.isIncomingRing()));
}
if (state.getFocusedParticipant() != CallParticipant.EMPTY && state.getAllRemoteParticipants().size() > 1) {
pages.add(WebRtcCallParticipantsPage.forSingleParticipant(state.getFocusedParticipant(), state.isInPipMode(), isPortrait, isLandscapeEnabled));
}
if ((state.getGroupCallState().isNotIdle() && state.getRemoteDevicesCount().orElse(0) > 0) || state.getGroupCallState().isConnected()) {
recipientName.setText(state.getRemoteParticipantsDescription(getContext()));
} else if (state.getGroupCallState().isNotIdle()) {
recipientName.setText(getContext().getString(R.string.WebRtcCallView__s_group_call, Recipient.resolved(recipientId).getDisplayName(getContext())));
if (state.getCallState() == WebRtcViewModel.State.CALL_PRE_JOIN && state.getGroupCallState().isNotIdle()) {
status.setText(state.getRemoteParticipantsDescription(getContext()));
}
if (state.getGroupCallState().isNotIdle() && participantCount != null) {
if (state.getGroupCallState().isNotIdle()) {
String text = state.getParticipantCount()
.mapToObj(String::valueOf).orElse("\u2014");
boolean enabled = state.getParticipantCount().isPresent();
participantCount.setText(text);
participantCount.setEnabled(enabled);
foldParticipantCount.setText(text);
foldParticipantCount.setEnabled(enabled);
}
@ -450,20 +469,13 @@ public class WebRtcCallView extends ConstraintLayout {
recipientId = recipient.getId();
largeHeaderAvatar.setRecipient(recipient, false);
if (recipient.isGroup()) {
if (toolbar.getMenu().findItem(R.id.menu_group_call_participants_list) == null) {
toolbar.inflateMenu(R.menu.group_call);
View showParticipants = toolbar.getMenu().findItem(R.id.menu_group_call_participants_list).getActionView();
showParticipants.setAlpha(0);
showParticipants.setOnClickListener(unused -> showParticipantsList());
foldParticipantCountWrapper.setOnClickListener(unused -> showParticipantsList());
participantCount = showParticipants.findViewById(R.id.show_participants_menu_counter);
}
} else {
recipientName.setText(recipient.getDisplayName(getContext()));
foldParticipantCountWrapper.setOnClickListener(unused -> showParticipantsList());
}
recipientName.setText(recipient.getDisplayName(getContext()));
}
public void setStatus(@NonNull String status) {
@ -515,18 +527,21 @@ public class WebRtcCallView extends ConstraintLayout {
visibleViewSet.clear();
if (webRtcControls.adjustForFold()) {
showParticipantsGuideline.setGuidelineBegin(-1);
showParticipantsGuideline.setGuidelineEnd(webRtcControls.getFold());
topFoldGuideline.setGuidelineEnd(webRtcControls.getFold());
callScreenTopFoldGuideline.setGuidelineEnd(webRtcControls.getFold());
if (webRtcControls.displayGroupMembersButton()) {
visibleViewSet.add(foldParticipantCountWrapper);
}
} else {
showParticipantsGuideline.setGuidelineBegin(((LayoutParams) statusBarGuideline.getLayoutParams()).guideBegin);
showParticipantsGuideline.setGuidelineEnd(-1);
topFoldGuideline.setGuidelineEnd(0);
callScreenTopFoldGuideline.setGuidelineEnd(0);
}
setShowParticipantsState(webRtcControls.adjustForFold());
if (webRtcControls.displayGroupMembersButton()) {
visibleViewSet.add(foldParticipantCountWrapper);
foldParticipantCount.setClickable(webRtcControls.adjustForFold());
}
if (webRtcControls.displayStartCallControls()) {
visibleViewSet.add(footerGradient);
@ -548,12 +563,6 @@ public class WebRtcCallView extends ConstraintLayout {
groupCallFullStub.get().setVisibility(View.GONE);
}
MenuItem item = toolbar.getMenu().findItem(R.id.menu_group_call_participants_list);
if (item != null) {
item.setVisible(webRtcControls.displayGroupMembersButton());
item.setEnabled(webRtcControls.displayGroupMembersButton());
}
if (webRtcControls.displayTopViews()) {
visibleViewSet.addAll(topViews);
}
@ -561,7 +570,9 @@ public class WebRtcCallView extends ConstraintLayout {
if (webRtcControls.displayIncomingCallButtons()) {
visibleViewSet.addAll(incomingCallViews);
status.setText(R.string.WebRtcCallView__signal_voice_call);
incomingRingStatus.setVisibility(VISIBLE);
incomingRingStatus.setText(R.string.WebRtcCallView__signal_call);
answer.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.webrtc_call_screen_answer));
}
@ -569,12 +580,19 @@ public class WebRtcCallView extends ConstraintLayout {
visibleViewSet.add(answerWithAudio);
visibleViewSet.add(answerWithAudioLabel);
status.setText(R.string.WebRtcCallView__signal_video_call);
incomingRingStatus.setVisibility(VISIBLE);
incomingRingStatus.setText(R.string.WebRtcCallView__signal_video_call);
answer.setImageDrawable(AppCompatResources.getDrawable(getContext(), R.drawable.webrtc_call_screen_answer_with_video));
}
if (!webRtcControls.displayIncomingCallButtons() && !webRtcControls.displayAnswerWithAudio()){
incomingRingStatus.setVisibility(GONE);
}
if (webRtcControls.displayAudioToggle()) {
visibleViewSet.add(audioToggle);
visibleViewSet.add(audioToggleLabel);
audioToggle.setControlAvailability(webRtcControls.enableHandsetInAudioToggle(),
webRtcControls.enableHeadsetInAudioToggle());
@ -584,19 +602,23 @@ public class WebRtcCallView extends ConstraintLayout {
if (webRtcControls.displayCameraToggle()) {
visibleViewSet.add(cameraDirectionToggle);
visibleViewSet.add(cameraDirectionToggleLabel);
}
if (webRtcControls.displayEndCall()) {
visibleViewSet.add(hangup);
visibleViewSet.add(hangupLabel);
visibleViewSet.add(footerGradient);
}
if (webRtcControls.displayMuteAudio()) {
visibleViewSet.add(micToggle);
visibleViewSet.add(micToggleLabel);
}
if (webRtcControls.displayVideoToggle()) {
visibleViewSet.add(videoToggle);
visibleViewSet.add(videoToggleLabel);
}
if (webRtcControls.displaySmallOngoingCallButtons()) {
@ -611,6 +633,14 @@ public class WebRtcCallView extends ConstraintLayout {
callParticipantsRecycler.setVisibility(View.GONE);
}
if (webRtcControls.showFullScreenShade()) {
fullScreenShade.setVisibility(VISIBLE);
visibleViewSet.remove(topGradient);
visibleViewSet.remove(footerGradient);
} else {
fullScreenShade.setVisibility(GONE);
}
if (webRtcControls.isFadeOutEnabled()) {
if (!controls.isFadeOutEnabled()) {
scheduleFadeOut();
@ -627,20 +657,26 @@ public class WebRtcCallView extends ConstraintLayout {
scheduleFadeOut();
}
boolean forceUpdate = webRtcControls.adjustForFold() && !controls.adjustForFold();
controls = webRtcControls;
if (!controls.isFadeOutEnabled()) {
controlsVisible = true;
}
allTimeVisibleViews.addAll(visibleViewSet);
if (!visibleViewSet.equals(lastVisibleSet) ||
!controls.isFadeOutEnabled()) {
!controls.isFadeOutEnabled() ||
(webRtcControls.showSmallHeader() && largeHeaderAvatar.getVisibility() == View.VISIBLE) ||
forceUpdate)
{
if (controlsListener != null) {
controlsListener.showSystemUI();
}
fadeInNewUiState(lastVisibleSet, webRtcControls.displaySmallOngoingCallButtons());
throttledDebouncer.publish(() -> fadeInNewUiState(webRtcControls.displaySmallOngoingCallButtons(), webRtcControls.showSmallHeader()));
}
onWindowSystemUiVisibilityChanged(getWindowSystemUiVisibility());
@ -660,18 +696,6 @@ public class WebRtcCallView extends ConstraintLayout {
}
}
private void setShowParticipantsState(boolean isFolded) {
MenuItem item = toolbar.getMenu().findItem(R.id.menu_group_call_participants_list);
if (item != null) {
View showParticipants = item.getActionView();
showParticipants.animate().alpha(isFolded ? 0f : 1f);
showParticipants.setClickable(!isFolded);
foldParticipantCountWrapper.animate().alpha(isFolded ? 1f : 0f);
foldParticipantCount.setClickable(isFolded);
}
}
private void expandPip(@NonNull CallParticipant localCallParticipant, @NonNull CallParticipant focusedParticipant) {
pictureInPictureExpansionHelper.expand(smallLocalRenderFrame, new PictureInPictureExpansionHelper.Callback() {
@Override
@ -857,16 +881,15 @@ public class WebRtcCallView extends ConstraintLayout {
}
}
private void fadeInNewUiState(@NonNull Set<View> previouslyVisibleViewSet, boolean useSmallMargins) {
private void fadeInNewUiState(boolean useSmallMargins, boolean showSmallHeader) {
Transition transition = new AutoTransition().setDuration(TRANSITION_DURATION_MILLIS);
TransitionManager.endTransitions(parent);
TransitionManager.beginDelayedTransition(parent, transition);
ConstraintSet constraintSet = new ConstraintSet();
constraintSet.clone(parent);
for (View view : SetUtil.difference(previouslyVisibleViewSet, visibleViewSet)) {
for (View view : SetUtil.difference(allTimeVisibleViews, visibleViewSet)) {
constraintSet.setVisibility(view.getId(), ConstraintSet.GONE);
}
@ -884,6 +907,10 @@ public class WebRtcCallView extends ConstraintLayout {
adjustParticipantsRecycler(constraintSet);
constraintSet.applyTo(parent);
if (showSmallHeader) {
smallHeaderConstraints.applyTo(toolbar);
}
}
private void adjustParticipantsRecycler(@NonNull ConstraintSet constraintSet) {

Wyświetl plik

@ -112,7 +112,7 @@ public final class WebRtcControls {
}
boolean displayGroupMembersButton() {
return groupCallState.isAtLeast(GroupCallState.CONNECTING);
return (groupCallState.isAtLeast(GroupCallState.CONNECTING) && hasAtLeastOneRemote) || groupCallState.isAtLeast(GroupCallState.FULL);
}
boolean displayEndCall() {
@ -175,6 +175,14 @@ public final class WebRtcControls {
return audioOutput;
}
boolean showSmallHeader() {
return isAtLeastOutgoing();
}
boolean showFullScreenShade() {
return isPreJoin() || isIncoming();
}
private boolean isError() {
return callState == CallState.ERROR;
}

Wyświetl plik

@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="16dp"
android:height="16dp"
android:viewportWidth="16"
android:viewportHeight="16">
<path
android:pathData="M10.78,2.41C10.034,2.0393 9.2214,1.8217 8.39,1.77V1.02C9.323,1.0755 10.2348,1.3205 11.07,1.74L10.78,2.41ZM1.78,4.89C1.3396,5.7207 1.0741,6.6328 1,7.57H1.75C1.8017,6.7386 2.0193,5.926 2.39,5.18L1.78,4.89ZM10.78,13.59C10.034,13.9607 9.2214,14.1783 8.39,14.23V14.98C9.323,14.9245 10.2348,14.6796 11.07,14.26L10.78,13.59ZM5.22,2.41C5.966,2.0393 6.7786,1.8217 7.61,1.77V1.02C6.677,1.0755 5.7652,1.3205 4.93,1.74L5.22,2.41ZM2.79,4.55C3.2506,3.8495 3.8495,3.2506 4.55,2.79L4.13,2.17C3.3324,2.6914 2.6514,3.3724 2.13,4.17L2.79,4.55ZM15,8.43H14.25C14.1983,9.2614 13.9807,10.0741 13.61,10.82L14.28,11.15C14.7048,10.3026 14.9499,9.3766 15,8.43ZM13.23,11.43C12.7694,12.1305 12.1705,12.7294 11.47,13.19L11.89,13.81C12.6898,13.2914 13.3713,12.6099 13.89,11.81L13.23,11.43ZM13.61,5.2C13.9807,5.946 14.1983,6.7586 14.25,7.59H15C14.9445,6.6571 14.6995,5.7452 14.28,4.91L13.61,5.2ZM11.45,2.79C12.1505,3.2506 12.7494,3.8495 13.21,4.55L13.83,4.13C13.3086,3.3324 12.6276,2.6514 11.83,2.13L11.45,2.79ZM1.45,11.24L2.19,11.36L2.32,10.59C2.004,9.8964 1.8176,9.1508 1.77,8.39L1,8.43C1.0487,9.2002 1.2244,9.9571 1.52,10.67L1.45,11.24ZM3.85,13.93L1.72,14.28L2.07,12.15L1.32,12L1,14C0.9795,14.1359 0.9914,14.2747 1.0349,14.4051C1.0783,14.5354 1.1521,14.6536 1.25,14.75C1.3283,14.833 1.4229,14.8988 1.5279,14.9436C1.6329,14.9883 1.7459,15.0109 1.86,15.01H2L4,14.69L3.85,13.93ZM5.41,13.68L4.64,13.81L4.76,14.55L5.33,14.46C6.0417,14.7625 6.7986,14.945 7.57,15V14.25C6.8216,14.1913 6.0899,13.9982 5.41,13.68ZM8,2.5C6.5413,2.5 5.1424,3.0795 4.1109,4.1109C3.0794,5.1424 2.5,6.5413 2.5,8C2.4999,8.8475 2.6985,9.6832 3.08,10.44L2.6,13.44L5.6,12.96C6.348,13.3216 7.1692,13.5063 8,13.5C9.4587,13.5 10.8576,12.9206 11.8891,11.8891C12.9205,10.8577 13.5,9.4587 13.5,8C13.5,6.5413 12.9205,5.1424 11.8891,4.1109C10.8576,3.0795 9.4587,2.5 8,2.5Z"
android:fillColor="#ffffff"/>
</vector>

Wyświetl plik

@ -1,31 +0,0 @@
<?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:layout_width="wrap_content"
android:layout_height="match_parent"
android:background="?attr/selectableItemBackground"
android:gravity="center"
android:minWidth="48dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:orientation="horizontal"
tools:background="@color/core_ultramarine">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
app:srcCompat="@drawable/ic_group_solid_24"
app:tint="@color/core_white" />
<TextView
android:id="@+id/show_participants_menu_counter"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textColor="@color/core_white"
android:textSize="13sp"
android:textStyle="bold"
tools:text="0" />
</LinearLayout>

Wyświetl plik

@ -67,6 +67,12 @@
</FrameLayout>
<View
android:id="@+id/call_screen_full_shade"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/transparent_black_40" />
<ViewStub
android:id="@+id/group_call_call_full_view"
android:layout_width="0dp"
@ -82,6 +88,13 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/call_screen_show_participants_guideline"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="horizontal"
app:layout_constraintGuide_begin="0dp" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/fold_top_call_screen_guideline"
android:layout_width="0dp"
@ -184,10 +197,11 @@
</org.thoughtcrime.securesms.util.views.TouchInterceptingFrameLayout>
<include
android:id="@+id/call_screen_toolbar"
layout="@layout/webrtc_call_view_toolbar"
layout="@layout/webrtc_call_view_header_large"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="64dp"
android:layout_marginEnd="64dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/call_screen_status_bar_guideline" />
@ -197,76 +211,188 @@
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="34dp"
android:layout_marginBottom="8dp"
android:scaleType="fitXY"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintBottom_toTopOf="@id/call_screen_button_labels_barrier"
app:layout_constraintEnd_toStartOf="@id/call_screen_camera_direction_toggle"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/webrtc_call_screen_speaker_toggle"
tools:visibility="visible" />
<TextView
android:id="@+id/call_screen_speaker_toggle_label"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:clickable="false"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text="@string/WebRtcCallView__speaker"
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintEnd_toEndOf="@id/call_screen_speaker_toggle"
app:layout_constraintStart_toStartOf="@id/call_screen_speaker_toggle"
app:layout_constraintTop_toBottomOf="@id/call_screen_speaker_toggle"
app:layout_constraintVertical_bias="0"
tools:visibility="visible" />
<ImageView
android:id="@+id/call_screen_camera_direction_toggle"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginEnd="16dp"
android:layout_marginBottom="34dp"
android:layout_marginBottom="8dp"
android:clickable="false"
android:scaleType="fitXY"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintBottom_toTopOf="@id/call_screen_button_labels_barrier"
app:layout_constraintEnd_toStartOf="@id/call_screen_video_toggle"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/call_screen_speaker_toggle"
app:srcCompat="@drawable/webrtc_call_screen_camera_toggle"
tools:visibility="visible" />
<TextView
android:id="@+id/call_screen_camera_direction_toggle_label"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:clickable="false"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text="@string/WebRtcCallView__flip"
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintEnd_toEndOf="@id/call_screen_camera_direction_toggle"
app:layout_constraintStart_toStartOf="@id/call_screen_camera_direction_toggle"
app:layout_constraintTop_toBottomOf="@id/call_screen_camera_direction_toggle"
app:layout_constraintVertical_bias="0"
tools:visibility="visible" />
<org.thoughtcrime.securesms.components.AccessibleToggleButton
android:id="@+id/call_screen_video_toggle"
style="@style/WebRtcCallV2CompoundButton"
android:layout_marginEnd="16dp"
android:layout_marginBottom="34dp"
android:layout_marginBottom="8dp"
android:background="@drawable/webrtc_call_screen_video_toggle"
android:stateListAnimator="@null"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintBottom_toTopOf="@id/call_screen_button_labels_barrier"
app:layout_constraintEnd_toStartOf="@id/call_screen_audio_mic_toggle"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/call_screen_camera_direction_toggle"
tools:checked="true"
tools:visibility="visible" />
<TextView
android:id="@+id/call_screen_video_toggle_label"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:clickable="false"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text="@string/WebRtcCallView__camera"
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintEnd_toEndOf="@id/call_screen_video_toggle"
app:layout_constraintStart_toStartOf="@id/call_screen_video_toggle"
app:layout_constraintTop_toBottomOf="@id/call_screen_video_toggle"
app:layout_constraintVertical_bias="0"
tools:visibility="visible" />
<org.thoughtcrime.securesms.components.AccessibleToggleButton
android:id="@+id/call_screen_audio_mic_toggle"
style="@style/WebRtcCallV2CompoundButton"
android:layout_marginEnd="16dp"
android:layout_marginBottom="34dp"
android:layout_marginBottom="8dp"
android:background="@drawable/webrtc_call_screen_mic_toggle"
android:stateListAnimator="@null"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintBottom_toTopOf="@id/call_screen_button_labels_barrier"
app:layout_constraintEnd_toStartOf="@id/call_screen_end_call"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/call_screen_video_toggle"
tools:visibility="visible" />
<TextView
android:id="@+id/call_screen_audio_mic_toggle_label"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:clickable="false"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text="@string/WebRtcCallView__mute"
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintEnd_toEndOf="@id/call_screen_audio_mic_toggle"
app:layout_constraintStart_toStartOf="@id/call_screen_audio_mic_toggle"
app:layout_constraintTop_toBottomOf="@id/call_screen_audio_mic_toggle"
app:layout_constraintVertical_bias="0"
tools:visibility="visible" />
<ImageView
android:id="@+id/call_screen_end_call"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_marginBottom="34dp"
android:layout_marginBottom="8dp"
android:clickable="false"
android:scaleType="fitXY"
android:visibility="gone"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintBottom_toTopOf="@id/call_screen_button_labels_barrier"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_chainStyle="packed"
app:layout_constraintStart_toEndOf="@id/call_screen_audio_mic_toggle"
app:srcCompat="@drawable/webrtc_call_screen_hangup"
tools:visibility="visible" />
<TextView
android:id="@+id/call_screen_end_call_label"
android:layout_width="56dp"
android:layout_height="wrap_content"
android:layout_marginBottom="32dp"
android:clickable="false"
android:ellipsize="end"
android:gravity="center"
android:maxLines="2"
android:text="@string/WebRtcCallView__end_call"
android:textAppearance="@style/TextAppearance.Signal.Subtitle"
android:textColor="@color/core_white"
android:visibility="gone"
app:layout_constrainedHeight="true"
app:layout_constraintBottom_toTopOf="@id/call_screen_start_call_controls"
app:layout_constraintEnd_toEndOf="@id/call_screen_end_call"
app:layout_constraintStart_toStartOf="@id/call_screen_end_call"
app:layout_constraintTop_toBottomOf="@id/call_screen_end_call"
app:layout_constraintVertical_bias="0"
tools:visibility="visible" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/call_screen_button_labels_barrier"
android:layout_width="match_parent"
android:layout_height="1dp"
app:barrierDirection="top"
app:constraint_referenced_ids="call_screen_speaker_toggle_label,call_screen_camera_direction_toggle_label,call_screen_video_toggle_label,call_screen_audio_mic_toggle_label,call_screen_end_call_label" />
<ImageView
android:id="@+id/call_screen_decline_call"
android:layout_width="56dp"
@ -361,29 +487,17 @@
app:layout_constraintStart_toStartOf="parent"
tools:visibility="visible">
<com.google.android.material.button.MaterialButton
android:id="@+id/call_screen_start_call_cancel"
style="@style/Widget.Signal.Button.Flat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="4dp"
android:layout_weight="1"
android:text="@android:string/cancel"
android:textAllCaps="false"
android:textColor="@color/core_white"
app:backgroundTint="@color/transparent_white_40" />
<com.google.android.material.button.MaterialButton
android:id="@+id/call_screen_start_call_start_call"
style="@style/Widget.Signal.Button.Flat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="4dp"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:minWidth="160dp"
android:text="@string/WebRtcCallView__start_call"
android:textAllCaps="false"
android:textColor="@color/core_green_text_button"
app:backgroundTint="@color/core_green" />
app:backgroundTint="@color/core_green"
app:cornerRadius="28dp" />
</LinearLayout>
@ -421,16 +535,16 @@
android:id="@+id/fold_show_participants_menu_counter_wrapper"
android:layout_width="wrap_content"
android:layout_height="56dp"
android:alpha="0"
android:background="?attr/selectableItemBackground"
android:gravity="center"
android:minWidth="48dp"
android:orientation="horizontal"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/fold_top_call_screen_guideline"
tools:background="@color/core_ultramarine">
app:layout_constraintTop_toBottomOf="@id/call_screen_show_participants_guideline"
tools:visibility="visible">
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="wrap_content"

Wyświetl plik

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/call_screen_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<TextView
android:id="@+id/call_screen_incoming_ring_status"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:textAppearance="@style/TextAppearance.Signal.Body2"
android:textColor="@color/core_white"
app:drawableStartCompat="@drawable/ic_signal_logo_small"
android:drawablePadding="4dp"
app:layout_constraintBottom_toBottomOf="@id/action_bar_guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Signal video call" />
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/call_screen_header_avatar"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_marginTop="106dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/action_bar_guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="?actionBarSize" />
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/call_screen_recipient_name"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:ellipsize="end"
android:gravity="center_horizontal"
android:maxLines="2"
android:textAppearance="@style/TextAppearance.Signal.Body1.Bold"
android:textColor="@color/core_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/call_screen_header_avatar"
tools:text="Kiera Thompson" />
<TextView
android:id="@+id/call_screen_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.Signal.Body2"
android:textColor="@color/core_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/call_screen_recipient_name"
tools:text="Signal Calling..." />
</androidx.constraintlayout.widget.ConstraintLayout>

Wyświetl plik

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/call_screen_header"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<TextView
android:id="@+id/call_screen_ringing_call_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:gravity="center"
android:textAppearance="@style/TextAppearance.Signal.Body2"
android:textColor="@color/core_white"
app:drawableStartCompat="@drawable/ic_signal_logo_small"
android:drawablePadding="4dp"
android:visibility="gone"
app:layout_constraintBottom_toBottomOf="@id/action_bar_guideline"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Signal video call" />
<org.thoughtcrime.securesms.components.AvatarImageView
android:id="@+id/call_screen_header_avatar"
android:layout_width="96dp"
android:layout_height="96dp"
android:layout_marginTop="106dp"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/action_bar_guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="?actionBarSize" />
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
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"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Kiera Thompson" />
<TextView
android:id="@+id/call_screen_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.Signal.Body2"
android:textColor="@color/core_white"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/call_screen_recipient_name"
tools:text="Signal Calling..." />
</androidx.constraintlayout.widget.ConstraintLayout>

Wyświetl plik

@ -1,51 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.appcompat.widget.Toolbar 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="wrap_content"
tools:menu="@menu/group_call">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="240dp"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/action_bar_guideline"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal"
app:layout_constraintGuide_begin="?actionBarSize" />
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
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"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Kiera Thompson" />
<TextView
android:id="@+id/call_screen_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:textAppearance="@style/TextAppearance.Signal.Body2"
android:textColor="@color/core_white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/call_screen_recipient_name"
tools:text="Signal Calling..." />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.appcompat.widget.Toolbar>

Wyświetl plik

@ -1,13 +0,0 @@
<?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"
xmlns:tools="http://schemas.android.com/tools">
<item
android:id="@+id/menu_group_call_participants_list"
android:title="@string/WebRtcCallView__view_participants_list"
app:actionLayout="@layout/show_participants_menu_view"
app:showAsAction="always"
tools:ignore="AlwaysShowAction" />
</menu>

Wyświetl plik

@ -1401,13 +1401,12 @@
<string name="WebRtcCallActivity__calling">Calling…</string>
<!-- WebRtcCallView -->
<string name="WebRtcCallView__signal_voice_call">Signal voice call…</string>
<string name="WebRtcCallView__signal_video_call">Signal video call…</string>
<string name="WebRtcCallView__signal_call">Signal Call</string>
<string name="WebRtcCallView__signal_video_call">Signal Video Call</string>
<string name="WebRtcCallView__start_call">Start Call</string>
<string name="WebRtcCallView__join_call">Join Call</string>
<string name="WebRtcCallView__call_is_full">Call is full</string>
<string name="WebRtcCallView__the_maximum_number_of_d_participants_has_been_Reached_for_this_call">The maximum number of %1$d participants has been reached for this call. Try again later.</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__reconnecting">Reconnecting…</string>
@ -1424,6 +1423,12 @@
<item quantity="other">%1$s, %2$s, and %3$d others are in this call</item>
</plurals>
<string name="WebRtcCallView__flip">Flip</string>
<string name="WebRtcCallView__speaker">Speaker</string>
<string name="WebRtcCallView__camera">Camera</string>
<string name="WebRtcCallView__mute">Mute</string>
<string name="WebRtcCallView__end_call">End call</string>
<!-- CallParticipantsListDialog -->
<plurals name="CallParticipantsListDialog_in_this_call_d_people">
<item quantity="one">In this call · %1$d person</item>