Proper layout for conference audio only mode
This commit is contained in:
parent
2be69da8a4
commit
5891babc5c
7 changed files with 88 additions and 72 deletions
|
@ -216,6 +216,7 @@ dependencies {
|
|||
implementation "androidx.window:window:1.0.0"
|
||||
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
|
||||
implementation "androidx.gridlayout:gridlayout:1.0.0"
|
||||
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.1'
|
||||
implementation 'androidx.recyclerview:recyclerview:1.2.1'
|
||||
|
|
|
@ -251,8 +251,7 @@ private fun <T> setEntries(
|
|||
viewGroup.removeAllViews()
|
||||
if (entries != null) {
|
||||
val inflater = viewGroup.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater
|
||||
for (i in entries.indices) {
|
||||
val entry = entries[i]
|
||||
for (entry in entries) {
|
||||
val binding = DataBindingUtil.inflate<ViewDataBinding>(
|
||||
inflater,
|
||||
layoutId,
|
||||
|
|
|
@ -25,12 +25,6 @@
|
|||
android:layout_margin="@{controlsViewModel.fullScreenMode || controlsViewModel.pipMode ? @dimen/voip_remote_margin_full_screen : @dimen/voip_remote_margin, default=@dimen/voip_remote_margin}"
|
||||
android:visibility="@{inflatedVisibility}">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:gravity="center"
|
||||
android:orientation="vertical">
|
||||
|
||||
<include
|
||||
android:id="@+id/header"
|
||||
layout="@layout/voip_conference_header"
|
||||
|
@ -42,23 +36,18 @@
|
|||
layout="@layout/voip_remote_recording"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@id/header"
|
||||
android:visibility="@{conferenceViewModel.isRemotelyRecorded ? View.VISIBLE : View.GONE, default=gone}" />
|
||||
|
||||
<androidx.core.widget.NestedScrollView
|
||||
<androidx.gridlayout.widget.GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="10dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_below="@id/remote_recording"
|
||||
android:layout_marginTop="10dp"
|
||||
app:entries="@{conferenceViewModel.conferenceParticipantDevices}"
|
||||
app:layout="@{@layout/voip_conference_participant_remote_audio_only}" />
|
||||
|
||||
</androidx.core.widget.NestedScrollView>
|
||||
|
||||
</LinearLayout>
|
||||
app:layout="@{@layout/voip_conference_participant_remote_audio_only}"
|
||||
app:columnCount="2"
|
||||
app:orientation="horizontal" />
|
||||
|
||||
</RelativeLayout>
|
||||
|
||||
|
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:layout_marginEnd="5dp">
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:id="@+id/group"
|
||||
|
|
|
@ -11,11 +11,15 @@
|
|||
type="org.linphone.activities.voip.data.ConferenceParticipantDeviceData" />
|
||||
</data>
|
||||
|
||||
<!-- Width MUST BE 0dp, otherwise column width will be broken when mute mic icon will be show! -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/voip_conference_audio_only_participant_cell_height">
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/voip_conference_audio_only_participant_cell_height"
|
||||
app:layout_columnWeight="1"
|
||||
app:layout_gravity="fill_horizontal">
|
||||
|
||||
<View
|
||||
android:id="@+id/view"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
|
@ -25,40 +29,6 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/participant_avatar"
|
||||
layout="@layout/voip_contact_avatar"
|
||||
android:layout_width="@dimen/voip_conference_audio_only_participant_avatar_size"
|
||||
android:layout_height="@dimen/voip_conference_audio_only_participant_avatar_size"
|
||||
android:layout_marginStart="10dp"
|
||||
app:data="@{data}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintHeight_max="200dp"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/participant_name"
|
||||
style="@style/call_remote_name_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:text="@{data.contact.name ?? data.displayName, default=`Merry Brandybuck`}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/participant_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
style="@style/call_remote_name_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="5dp"
|
||||
android:text="@string/conference_participant_paused"
|
||||
android:visibility="@{data.isInConference ? View.GONE : View.VISIBLE, default=gone}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/participant_name"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
|
@ -72,7 +42,52 @@
|
|||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<include
|
||||
android:id="@+id/participant_avatar"
|
||||
layout="@layout/voip_contact_avatar"
|
||||
android:layout_width="@dimen/voip_conference_audio_only_participant_avatar_size"
|
||||
android:layout_height="@dimen/voip_conference_audio_only_participant_avatar_size"
|
||||
android:layout_marginStart="10dp"
|
||||
android:visibility="@{data.isInConference ? View.VISIBLE : View.GONE}"
|
||||
app:data="@{data}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/paused_avatar"
|
||||
app:layout_constraintHorizontal_chainStyle="spread_inside"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/paused_avatar"
|
||||
android:layout_width="@dimen/voip_conference_audio_only_participant_avatar_size"
|
||||
android:layout_height="@dimen/voip_conference_audio_only_participant_avatar_size"
|
||||
android:layout_marginStart="10dp"
|
||||
android:background="@drawable/shape_button_background"
|
||||
android:contentDescription="@string/content_description_participant_is_paused"
|
||||
android:src="@drawable/icon_pause"
|
||||
android:visibility="@{data.isInConference ? View.GONE : View.VISIBLE, default=gone}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/participant_name"
|
||||
app:layout_constraintStart_toEndOf="@+id/participant_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/participant_name"
|
||||
style="@style/call_remote_name_small_font"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginEnd="10dp"
|
||||
android:ellipsize="end"
|
||||
android:gravity="center_vertical"
|
||||
android:maxLines="2"
|
||||
android:text="@{(data.contact.name ?? data.displayName) + (data.isInConference ? `` : ` ` + @string/conference_participant_paused), default=`Merry Brandybuck`}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@+id/participant_mic_muted"
|
||||
app:layout_constraintStart_toEndOf="@+id/paused_avatar"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/participant_mic_muted"
|
||||
android:layout_width="@dimen/voip_conference_participant_mic_muted_icon_size_grid"
|
||||
android:layout_height="@dimen/voip_conference_participant_mic_muted_icon_size_grid"
|
||||
android:layout_marginEnd="10dp"
|
||||
|
@ -83,6 +98,7 @@
|
|||
android:visibility="@{data.micMuted ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/participant_name"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
<dimen name="voip_dialog_button_max_width">137dp</dimen>
|
||||
<dimen name="voip_contact_avatar_max_height">200dp</dimen>
|
||||
<dimen name="voip_numpad_button_max_size">60dp</dimen>
|
||||
<dimen name="voip_conference_audio_only_participant_cell_height">60dp</dimen>
|
||||
<dimen name="voip_conference_audio_only_participant_cell_height">80dp</dimen>
|
||||
<dimen name="voip_conference_audio_only_participant_avatar_size">40dp</dimen>
|
||||
<dimen name="conference_schedule_form_field_border_thickness">1dp</dimen>
|
||||
<dimen name="master_fragment_width">280dp</dimen>
|
||||
|
|
|
@ -184,6 +184,15 @@
|
|||
<item name="autoSizeStepGranularity">@dimen/settings_granularity_step</item>
|
||||
</style>
|
||||
|
||||
<style name="call_remote_name_small_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/white_color</item>
|
||||
<item name="android:textSize">16sp</item>
|
||||
<item name="autoSizeTextType">uniform</item>
|
||||
<item name="autoSizeMinTextSize">12sp</item>
|
||||
<item name="autoSizeMaxTextSize">16sp</item>
|
||||
<item name="autoSizeStepGranularity">@dimen/settings_granularity_step</item>
|
||||
</style>
|
||||
|
||||
<style name="call_options_font" parent="@android:style/TextAppearance.Medium">
|
||||
<item name="android:textColor">@color/voip_extra_button_text_color</item>
|
||||
<item name="android:textSize">12sp</item>
|
||||
|
|
Loading…
Reference in a new issue