Fix toolbar state management and pip.

This commit is contained in:
Alex Hart
2023-04-06 10:42:02 -03:00
parent cd5c253a78
commit 73a7063867
2 changed files with 17 additions and 10 deletions

View File

@@ -185,9 +185,9 @@ public class WebRtcCallView extends ConstraintLayout {
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);
largeHeader = findViewById(R.id.call_screen_header);
startCall = findViewById(R.id.call_screen_start_call_start_call);
callParticipantsRecycler = findViewById(R.id.call_screen_participants_recycler);
largeHeader = 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));
@@ -224,6 +224,8 @@ public class WebRtcCallView extends ConstraintLayout {
}
});
topViews.add(collapsedToolbar);
topViews.add(headerToolbar);
topViews.add(largeHeader);
topViews.add(topGradient);
@@ -997,13 +999,19 @@ public class WebRtcCallView extends ConstraintLayout {
constraintSet.applyTo(parent);
if (showSmallHeader) {
collapsedToolbar.setVisibility(View.VISIBLE);
headerToolbar.setVisibility(View.GONE);
largeHeader.setVisibility(View.GONE);
collapsedToolbar.setEnabled(true);
collapsedToolbar.setAlpha(1);
headerToolbar.setEnabled(false);
headerToolbar.setAlpha(0);
largeHeader.setEnabled(false);
largeHeader.setAlpha(0);
} else {
collapsedToolbar.setVisibility(View.GONE);
headerToolbar.setVisibility(View.VISIBLE);
largeHeader.setVisibility(View.VISIBLE);
collapsedToolbar.setEnabled(false);
collapsedToolbar.setAlpha(0);
headerToolbar.setEnabled(true);
headerToolbar.setAlpha(1);
largeHeader.setEnabled(true);
largeHeader.setAlpha(1);
}
}

View File

@@ -214,7 +214,6 @@
android:layout_width="match_parent"
android:layout_height="@dimen/signal_m3_toolbar_height"
android:minHeight="@dimen/signal_m3_toolbar_height"
android:visibility="gone"
app:layout_constraintTop_toTopOf="@id/call_screen_status_bar_guideline"
app:menu="@menu/webrtc_toolbar_menu"
app:navigationIcon="@drawable/ic_arrow_left_24"