Group voice broadcast controller buttons in a Flow

This commit is contained in:
Florian Renaud 2022-10-21 14:49:29 +02:00
parent 2a977f341b
commit 6a88c61d12
2 changed files with 21 additions and 21 deletions

View File

@ -118,6 +118,15 @@
app:barrierMargin="12dp"
app:constraint_referenced_ids="roomAvatarImageView,titleText,broadcasterViewGroup,voiceBroadcastViewGroup" />
<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/controllerButtonsFlow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:constraint_referenced_ids="playPauseButton,bufferingView"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/headerBottomBarrier" />
<ImageButton
android:id="@+id/playPauseButton"
android:layout_width="@dimen/voice_broadcast_controller_button_size"
@ -126,24 +135,14 @@
android:backgroundTint="?vctr_system"
android:contentDescription="@string/a11y_play_voice_broadcast"
android:src="@drawable/ic_play_pause_play"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/headerBottomBarrier"
app:tint="?vctr_content_secondary" />
<ProgressBar
android:id="@+id/bufferingView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:contentDescription="@string/a11y_voice_broadcast_buffering"
android:indeterminate="true"
android:indeterminateTint="?vctr_content_secondary"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/headerBottomBarrier" />
android:indeterminateTint="?vctr_content_secondary" />
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@ -64,6 +64,15 @@
app:barrierMargin="12dp"
app:constraint_referenced_ids="roomAvatarImageView,titleText" />
<androidx.constraintlayout.helper.widget.Flow
android:id="@+id/controllerButtonsFlow"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
app:constraint_referenced_ids="recordButton,stopRecordButton"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@id/headerBottomBarrier" />
<ImageButton
android:id="@+id/recordButton"
android:layout_width="@dimen/voice_broadcast_controller_button_size"
@ -71,11 +80,7 @@
android:background="@drawable/bg_rounded_button"
android:backgroundTint="?vctr_system"
android:contentDescription="@string/a11y_resume_voice_broadcast_record"
android:src="@drawable/ic_recording_dot"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@id/stopRecordButton"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/headerBottomBarrier" />
android:src="@drawable/ic_recording_dot" />
<ImageButton
android:id="@+id/stopRecordButton"
@ -84,10 +89,6 @@
android:background="@drawable/bg_rounded_button"
android:backgroundTint="?vctr_system"
android:contentDescription="@string/a11y_stop_voice_broadcast_record"
android:src="@drawable/ic_stop"
app:layout_constraintBottom_toBottomOf="@id/recordButton"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/recordButton"
app:layout_constraintTop_toTopOf="@id/recordButton" />
android:src="@drawable/ic_stop" />
</androidx.constraintlayout.widget.ConstraintLayout>