Meetings can be scheduled

This commit is contained in:
Sylvain Berfini 2023-10-24 13:50:24 +02:00
parent cf41bef449
commit 19a15bedfa
13 changed files with 762 additions and 455 deletions

View file

@ -33,6 +33,7 @@ import com.google.android.material.datepicker.MaterialDatePicker
import com.google.android.material.timepicker.MaterialTimePicker
import com.google.android.material.timepicker.TimeFormat
import org.linphone.R
import org.linphone.core.tools.Log
import org.linphone.databinding.MeetingScheduleFragmentBinding
import org.linphone.ui.main.fragment.GenericFragment
import org.linphone.ui.main.meetings.viewmodel.ScheduleMeetingViewModel
@ -58,8 +59,6 @@ class ScheduleMeetingFragment : GenericFragment() {
}
override fun goBack(): Boolean {
sharedViewModel.closeSlidingPaneEvent.value = Event(true)
// If not done, when going back to MeetingsList this fragment will be created again
return findNavController().popBackStack()
}
@ -150,5 +149,28 @@ class ScheduleMeetingFragment : GenericFragment() {
}
picker.show(parentFragmentManager, "End time picker")
}
binding.setPickParticipantsClickListener {
Log.i("$TAG Going into participant picker fragment")
val action = ScheduleMeetingFragmentDirections.actionScheduleMeetingFragmentToAddParticipantsFragment()
findNavController().navigate(action)
}
viewModel.conferenceCreatedEvent.observe(viewLifecycleOwner) {
it.consume {
Log.i("$TAG Conference was scheduled, leaving fragment and ask list to refresh")
sharedViewModel.forceRefreshMeetingsListEvent.value = Event(true)
goBack()
}
}
sharedViewModel.listOfSelectedSipUrisEvent.observe(viewLifecycleOwner) {
it.consume { list ->
Log.i(
"$TAG Found [${list.size}] new participants to add to the meeting, let's do it"
)
viewModel.addParticipants(list)
}
}
}
}

View file

@ -194,6 +194,12 @@ class MeetingViewModel @UiThread constructor() : ViewModel() {
speakersList.add(ParticipantModel(participant, isOrganizer))
}
}
if (allSpeaker) {
Log.i("$TAG All participants have Speaker role, considering it is a meeting")
participantsList.addAll(speakersList)
}
if (!organizerFound && organizer != null) {
Log.i("$TAG Organizer not found in participants list, adding it to participants list")
participantsList.add(ParticipantModel(organizer, true))

View file

@ -20,14 +20,25 @@
package org.linphone.ui.main.meetings.viewmodel
import androidx.annotation.UiThread
import androidx.annotation.WorkerThread
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import java.util.Calendar
import java.util.Locale
import java.util.TimeZone
import org.linphone.LinphoneApplication.Companion.coreContext
import org.linphone.R
import org.linphone.core.Address
import org.linphone.core.ChatRoom
import org.linphone.core.ConferenceScheduler
import org.linphone.core.ConferenceSchedulerListenerStub
import org.linphone.core.Factory
import org.linphone.core.Participant
import org.linphone.core.ParticipantInfo
import org.linphone.core.tools.Log
import org.linphone.ui.main.model.SelectedAddressModel
import org.linphone.utils.AppUtils
import org.linphone.utils.Event
import org.linphone.utils.TimestampUtils
class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
@ -57,6 +68,12 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
val sendInvitations = MutableLiveData<Boolean>()
val participants = MutableLiveData<ArrayList<SelectedAddressModel>>()
val operationInProgress = MutableLiveData<Boolean>()
val conferenceCreatedEvent = MutableLiveData<Event<Boolean>>()
private var startTimestamp = 0L
private var endTimestamp = 0L
@ -66,10 +83,76 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
internal var endHour = 0
internal var endMinutes = 0
private lateinit var conferenceScheduler: ConferenceScheduler
private val conferenceSchedulerListener = object : ConferenceSchedulerListenerStub() {
@WorkerThread
override fun onStateChanged(
conferenceScheduler: ConferenceScheduler,
state: ConferenceScheduler.State?
) {
Log.i("$TAG Conference state changed [$state]")
when (state) {
ConferenceScheduler.State.Error -> {
operationInProgress.postValue(false)
// TODO: show error toast
}
ConferenceScheduler.State.Ready -> {
val conferenceAddress = conferenceScheduler.info?.uri
Log.i(
"$TAG Conference info created, address will be ${conferenceAddress?.asStringUriOnly()}"
)
if (sendInvitations.value == true) {
Log.i("$TAG User asked for invitations to be sent, let's do it")
val chatRoomParams = coreContext.core.createDefaultChatRoomParams()
chatRoomParams.isGroupEnabled = false
chatRoomParams.backend = ChatRoom.Backend.FlexisipChat
chatRoomParams.isEncryptionEnabled = true
chatRoomParams.subject = "Meeting invitation" // Won't be used
conferenceScheduler.sendInvitations(chatRoomParams)
} else {
Log.i("$TAG User didn't asked for invitations to be sent")
operationInProgress.postValue(false)
conferenceCreatedEvent.postValue(Event(true))
}
}
else -> {
}
}
}
@WorkerThread
override fun onInvitationsSent(
conferenceScheduler: ConferenceScheduler,
failedInvitations: Array<out Address>?
) {
when (val failedCount = failedInvitations?.size) {
0 -> {
Log.i("$TAG All invitations have been sent")
}
participants.value.orEmpty().size -> {
Log.e("$TAG No invitation sent!")
// TODO: show error toast
}
else -> {
Log.w("$TAG [$failedCount] invitations couldn't have been sent for:")
for (failed in failedInvitations.orEmpty()) {
Log.w(failed.asStringUriOnly())
}
// TODO: show error toast
}
}
operationInProgress.postValue(false)
conferenceCreatedEvent.postValue(Event(true))
}
}
init {
isBroadcastSelected.value = false
showBroadcastHelp.value = false
allDayMeeting.value = false
sendInvitations.value = true
val now = System.currentTimeMillis()
val cal = Calendar.getInstance()
@ -109,7 +192,16 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
}
}
)
sendInvitations.value = true
}
override fun onCleared() {
super.onCleared()
coreContext.postOnCoreThread {
if (::conferenceScheduler.isInitialized) {
conferenceScheduler.removeListener(conferenceSchedulerListener)
}
}
}
@UiThread
@ -171,6 +263,80 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
showBroadcastHelp.value = false
}
@UiThread
fun addParticipants(toAdd: ArrayList<String>) {
coreContext.postOnCoreThread {
val list = arrayListOf<SelectedAddressModel>()
for (participant in toAdd) {
val address = Factory.instance().createAddress(participant)
if (address == null) {
Log.e("$TAG Failed to parse [$participant] as address!")
} else {
val avatarModel = coreContext.contactsManager.getContactAvatarModelForAddress(
address
)
val model = SelectedAddressModel(address, avatarModel) {
// onRemoveFromSelection
}
list.add(model)
}
}
participants.postValue(list)
}
}
@UiThread
fun schedule() {
coreContext.postOnCoreThread { core ->
Log.i(
"$TAG Scheduling ${if (isBroadcastSelected.value == true) "broadcast" else "meeting"}"
)
operationInProgress.postValue(true)
val localAccount = core.defaultAccount
val localAddress = localAccount?.params?.identityAddress
val conferenceInfo = Factory.instance().createConferenceInfo()
conferenceInfo.organizer = localAddress
conferenceInfo.subject = subject.value
conferenceInfo.description = description.value
val startTime = startTimestamp / 1000 // Linphone expects timestamp in seconds
conferenceInfo.dateTime = startTime
val duration = ((endTimestamp - startTimestamp) / 1000).toInt() // Linphone expects duration in seconds
conferenceInfo.duration = duration
val participantsList = participants.value.orEmpty()
val participantsInfoList = arrayListOf<ParticipantInfo>()
for (participant in participantsList) {
val info = Factory.instance().createParticipantInfo(participant.address)
if (info == null) {
Log.e(
"$TAG Failed to create Participant Info from address [${participant.address.asStringUriOnly()}]"
)
continue
}
// For meetings, all participants must have Speaker role
info.role = Participant.Role.Speaker
participantsInfoList.add(info)
}
val participantsInfoArray = arrayOfNulls<ParticipantInfo>(participantsInfoList.size)
participantsInfoList.toArray(participantsInfoArray)
conferenceInfo.setParticipantInfos(participantsInfoArray)
if (!::conferenceScheduler.isInitialized) {
conferenceScheduler = core.createConferenceScheduler()
conferenceScheduler.addListener(conferenceSchedulerListener)
}
conferenceScheduler.account = localAccount
// Will trigger the conference creation/update automatically
conferenceScheduler.info = conferenceInfo
}
}
@UiThread
private fun computeDateLabels() {
val start = TimestampUtils.toString(

View file

@ -14,7 +14,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/conversations_list"
android:name="org.linphone.ui.main.chat.fragment.ConversationsListFragment"
android:layout_width="@dimen/sliding_pane_left_fragment_with_nav_width"
android:layout_width="@dimen/sliding_pane_left_fragment_width"
android:layout_height="match_parent"
app:layout="@layout/chat_list_fragment"/>

View file

@ -14,7 +14,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/contacts_list"
android:name="org.linphone.ui.main.contacts.fragment.ContactsListFragment"
android:layout_width="@dimen/sliding_pane_left_fragment_with_nav_width"
android:layout_width="@dimen/sliding_pane_left_fragment_width"
android:layout_height="match_parent"
app:layout="@layout/contacts_list_fragment"/>

View file

@ -14,7 +14,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/history"
android:name="org.linphone.ui.main.history.fragment.HistoryListFragment"
android:layout_width="@dimen/sliding_pane_left_fragment_with_nav_width"
android:layout_width="@dimen/sliding_pane_left_fragment_width"
android:layout_height="match_parent"
app:layout="@layout/history_list_fragment"/>

View file

@ -14,7 +14,7 @@
<androidx.fragment.app.FragmentContainerView
android:id="@+id/meetings_list"
android:name="org.linphone.ui.main.meetings.fragment.MeetingsListFragment"
android:layout_width="@dimen/sliding_pane_left_fragment_with_nav_width"
android:layout_width="@dimen/sliding_pane_left_fragment_width"
android:layout_height="match_parent"
app:layout="@layout/meetings_list_fragment"/>

View file

@ -19,479 +19,522 @@
<variable
name="pickEndTimeClickListener"
type="View.OnClickListener" />
<variable
name="pickParticipantsClickListener"
type="View.OnClickListener" />
<variable
name="viewModel"
type="org.linphone.ui.main.meetings.viewmodel.ScheduleMeetingViewModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
android:layout_height="match_parent">
<ImageView
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:padding="15dp"
android:adjustViewBounds="true"
android:onClick="@{backClickListener}"
android:src="@drawable/caret_left"
app:tint="@color/orange_main_500"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/title"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/white">
<androidx.appcompat.widget.AppCompatTextView
style="@style/main_page_title_style"
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="@dimen/top_bar_height"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="@string/meeting_schedule_title"
app:layout_constraintEnd_toStartOf="@id/schedule"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="parent"/>
<ImageView
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:padding="15dp"
android:adjustViewBounds="true"
android:onClick="@{backClickListener}"
android:src="@drawable/caret_left"
app:tint="@color/orange_main_500"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/title"/>
<ImageView
android:id="@+id/schedule"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:padding="15dp"
android:adjustViewBounds="true"
android:src="@drawable/check"
app:tint="@color/orange_main_500"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/title" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/main_page_title_style"
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="@dimen/top_bar_height"
android:layout_marginStart="10dp"
android:layout_marginEnd="10dp"
android:text="@string/meeting_schedule_title"
app:layout_constraintEnd_toStartOf="@id/schedule"
app:layout_constraintStart_toEndOf="@id/back"
app:layout_constraintTop_toTopOf="parent"/>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintBottom_toBottomOf="parent">
<ImageView
android:id="@+id/schedule"
android:onClick="@{() -> viewModel.schedule()}"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:padding="15dp"
android:adjustViewBounds="true"
android:src="@drawable/check"
app:tint="@color/orange_main_500"
app:layout_constraintBottom_toBottomOf="@id/title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@id/title" />
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<ScrollView
android:id="@+id/scrollView"
android:layout_width="0dp"
android:layout_height="0dp"
android:fillViewport="true"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/title"
app:layout_constraintBottom_toBottomOf="parent">
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/meeting_selected"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_meeting_label"
android:textColor="@color/primary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/users_three"
android:drawableTint="@color/primary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/primary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/broadcast"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/broadcast"
android:onClick="@{() -> viewModel.selectBroadcast()}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_broadcast_label"
android:textColor="@color/secondary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/slideshow"
android:drawableTint="@color/secondary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/secondary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/meeting_selected"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/meeting"
android:onClick="@{() -> viewModel.selectMeeting()}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_meeting_label"
android:textColor="@color/secondary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/users_three"
android:drawableTint="@color/secondary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/secondary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toBottomOf="@id/meeting_selected"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/broadcast_selected"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/broadcast_selected"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_broadcast_label"
android:textColor="@color/primary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/slideshow"
android:drawableTint="@color/primary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/primary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toBottomOf="@id/broadcast"
app:layout_constraintStart_toEndOf="@id/meeting"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/broadcast_help"
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/meeting_schedule_broadcast_help"
android:textSize="14sp"
android:textColor="@color/gray_main2_500"
android:drawableStart="@drawable/info"
android:drawablePadding="5dp"
android:gravity="center"
android:background="@drawable/shape_squircle_main2_100_background"
android:visibility="@{viewModel.showBroadcastHelp ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toBottomOf="@id/meeting"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
android:layout_height="wrap_content">
<ImageView
android:id="@+id/close_broadcast_help"
android:onClick="@{() -> viewModel.closeBroadcastHelp()}"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="16dp"
android:src="@drawable/x"
android:visibility="@{viewModel.showBroadcastHelp ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toTopOf="@id/broadcast_help"
app:layout_constraintBottom_toBottomOf="@id/broadcast_help"
app:layout_constraintEnd_toEndOf="@id/broadcast_help" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/meeting_selected"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_meeting_label"
android:textColor="@color/primary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/users_three"
android:drawableTint="@color/primary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/primary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/broadcast"/>
<androidx.appcompat.widget.AppCompatEditText
style="@style/default_text_style_800"
android:id="@+id/subject"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/meeting_schedule_subject_hint"
android:textColorHint="@color/gray_main2_600"
android:text="@={viewModel.subject}"
android:textSize="20sp"
android:textColor="@color/gray_main2_600"
android:inputType="text|textCapSentences"
android:drawableStart="@{viewModel.isBroadcastSelected ? @drawable/slideshow : @drawable/users_three, default=@drawable/users_three}"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:background="@color/transparent_color"
app:layout_constraintTop_toBottomOf="@id/broadcast_help"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/broadcast"
android:onClick="@{() -> viewModel.selectBroadcast()}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_broadcast_label"
android:textColor="@color/secondary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/slideshow"
android:drawableTint="@color/secondary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/secondary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.GONE : View.VISIBLE}"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/meeting_selected"
app:layout_constraintEnd_toEndOf="parent"/>
<View
android:id="@+id/separator"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/subject"
android:background="@color/gray_main2_200" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/meeting"
android:onClick="@{() -> viewModel.selectMeeting()}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_meeting_label"
android:textColor="@color/secondary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/users_three"
android:drawableTint="@color/secondary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/secondary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toBottomOf="@id/meeting_selected"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/broadcast_selected"/>
<com.google.android.material.materialswitch.MaterialSwitch
style="@style/material_switch_style"
android:id="@+id/all_day_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:checked="@={viewModel.allDayMeeting}"
app:layout_constraintStart_toEndOf="@id/all_day"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/broadcast_selected"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_broadcast_label"
android:textColor="@color/primary_button_label_color"
android:textSize="16sp"
android:gravity="center"
android:drawableStart="@drawable/slideshow"
android:drawableTint="@color/primary_button_label_color"
android:drawablePadding="5dp"
android:background="@drawable/primary_button_background"
android:paddingTop="@dimen/primary_secondary_buttons_label_padding"
android:paddingBottom="@dimen/primary_secondary_buttons_label_padding"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toBottomOf="@id/broadcast"
app:layout_constraintStart_toEndOf="@id/meeting"
app:layout_constraintEnd_toEndOf="parent"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/all_day"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/meeting_schedule_date_all_day_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/clock"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/all_day_switch"
app:layout_constraintTop_toTopOf="@id/all_day_switch"
app:layout_constraintBottom_toBottomOf="@id/all_day_switch"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/broadcast_help"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:paddingStart="16dp"
android:paddingEnd="16dp"
android:text="@string/meeting_schedule_broadcast_help"
android:textSize="14sp"
android:textColor="@color/gray_main2_500"
android:drawableStart="@drawable/info"
android:drawablePadding="5dp"
android:gravity="center"
android:background="@drawable/shape_squircle_main2_100_background"
android:visibility="@{viewModel.showBroadcastHelp ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toBottomOf="@id/meeting"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/from_date"
android:onClick="@{pickStartDateClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:text="@{viewModel.fromDate, default=`Tue. October 10th, 2023`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="@id/all_day"
app:layout_constraintTop_toBottomOf="@id/all_day_switch" />
<ImageView
android:id="@+id/close_broadcast_help"
android:onClick="@{() -> viewModel.closeBroadcastHelp()}"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginEnd="16dp"
android:src="@drawable/x"
android:visibility="@{viewModel.showBroadcastHelp ? View.VISIBLE : View.GONE}"
app:layout_constraintTop_toTopOf="@id/broadcast_help"
app:layout_constraintBottom_toBottomOf="@id/broadcast_help"
app:layout_constraintEnd_toEndOf="@id/broadcast_help" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/from_time"
android:onClick="@{pickStartTimeClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.fromTime, default=`17:00`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="@id/all_day_switch"
app:layout_constraintTop_toTopOf="@id/from_date" />
<androidx.appcompat.widget.AppCompatEditText
style="@style/default_text_style_800"
android:id="@+id/subject"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/meeting_schedule_subject_hint"
android:textColorHint="@color/gray_main2_600"
android:text="@={viewModel.subject}"
android:textSize="20sp"
android:textColor="@color/gray_main2_600"
android:inputType="text|textCapSentences"
android:drawableStart="@{viewModel.isBroadcastSelected ? @drawable/slideshow : @drawable/users_three, default=@drawable/users_three}"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:background="@color/transparent_color"
app:layout_constraintTop_toBottomOf="@id/broadcast_help"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/to_date"
android:onClick="@{pickEndDateClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@{viewModel.toDate, default=`Tue. October 10th, 2023`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toStartOf="@id/from_date"
app:layout_constraintTop_toBottomOf="@id/from_date" />
<View
android:id="@+id/separator"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="10dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/subject"
android:background="@color/gray_main2_200" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/to_time"
android:onClick="@{pickEndTimeClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.toTime, default=`17:00`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="@id/all_day_switch"
app:layout_constraintTop_toTopOf="@id/to_date" />
<com.google.android.material.materialswitch.MaterialSwitch
style="@style/material_switch_style"
android:id="@+id/all_day_switch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:layout_marginTop="16dp"
android:checked="@={viewModel.allDayMeeting}"
app:layout_constraintStart_toEndOf="@id/all_day"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/timezone"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="26dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@{viewModel.timezone, default=@string/meeting_schedule_timezone_title}"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:maxLines="1"
android:ellipsize="end"
android:drawableStart="@drawable/globe_hemisphere_west"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/to_date" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/all_day"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@string/meeting_schedule_date_all_day_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/clock"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/all_day_switch"
app:layout_constraintTop_toTopOf="@id/all_day_switch"
app:layout_constraintBottom_toBottomOf="@id/all_day_switch"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/repeat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_one_time_label"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/arrow_clockwise"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/timezone" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/from_date"
android:onClick="@{pickStartDateClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="32dp"
android:layout_marginTop="16dp"
android:text="@{viewModel.fromDate, default=`Tue. October 10th, 2023`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="@id/all_day"
app:layout_constraintTop_toBottomOf="@id/all_day_switch" />
<View
android:id="@+id/separator_2"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/repeat"
android:background="@color/gray_main2_200" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/from_time"
android:onClick="@{pickStartTimeClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.fromTime, default=`17:00`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="@id/all_day_switch"
app:layout_constraintTop_toTopOf="@id/from_date" />
<androidx.appcompat.widget.AppCompatEditText
style="@style/default_text_style_700"
android:id="@+id/description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/meeting_schedule_description_hint"
android:textColorHint="@color/gray_main2_600"
android:text="@={viewModel.description}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:inputType="text|textCapSentences"
android:drawableStart="@drawable/file_text"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:background="@color/transparent_color"
app:layout_constraintTop_toBottomOf="@id/separator_2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/to_date"
android:onClick="@{pickEndDateClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:text="@{viewModel.toDate, default=`Tue. October 10th, 2023`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toStartOf="@id/from_date"
app:layout_constraintTop_toBottomOf="@id/from_date" />
<View
android:id="@+id/separator_3"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/description"
android:background="@color/gray_main2_200" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/to_time"
android:onClick="@{pickEndTimeClickListener}"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@{viewModel.toTime, default=`17:00`}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="@id/all_day_switch"
app:layout_constraintTop_toTopOf="@id/to_date" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/speakers"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_add_speaker_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/user_square"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator_3" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/timezone"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="26dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@{viewModel.timezone, default=@string/meeting_schedule_timezone_title}"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:maxLines="1"
android:ellipsize="end"
android:drawableStart="@drawable/globe_hemisphere_west"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/to_date" />
<View
android:id="@+id/separator_4"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/speakers"
android:background="@color/gray_main2_200" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/repeat"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="24dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_one_time_label"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/arrow_clockwise"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/timezone" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/participants"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_add_participants_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/users"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator_4" />
<View
android:id="@+id/separator_2"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/repeat"
android:background="@color/gray_main2_200" />
<View
android:id="@+id/separator_5"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/participants"
android:background="@color/gray_main2_200" />
<androidx.appcompat.widget.AppCompatEditText
style="@style/default_text_style_700"
android:id="@+id/description"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:hint="@string/meeting_schedule_description_hint"
android:textColorHint="@color/gray_main2_600"
android:text="@={viewModel.description}"
android:textSize="14sp"
android:textColor="@color/gray_main2_600"
android:inputType="text|textCapSentences"
android:drawableStart="@drawable/file_text"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:background="@color/transparent_color"
app:layout_constraintTop_toBottomOf="@id/separator_2"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<CheckBox
style="@style/default_text_style"
android:id="@+id/send_invitations"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_send_invitations_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:checked="@={viewModel.sendInvitations}"
app:layout_constraintTop_toBottomOf="@id/separator_5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
<View
android:id="@+id/separator_3"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/description"
android:background="@color/gray_main2_200" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/speakers"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_add_speaker_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/user_square"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:visibility="@{viewModel.isBroadcastSelected ? View.VISIBLE : View.GONE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator_3" />
</ScrollView>
<View
android:id="@+id/separator_4"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/speakers"
android:background="@color/gray_main2_200" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style_700"
android:id="@+id/participants"
android:onClick="@{pickParticipantsClickListener}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_add_participants_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:drawableStart="@drawable/users"
android:drawablePadding="8dp"
android:drawableTint="@color/gray_main2_600"
android:visibility="@{viewModel.participants.size() > 0 ? View.GONE : View.VISIBLE}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/separator_4" />
<ImageView
android:id="@+id/participants_list_icon"
android:onClick="@{pickParticipantsClickListener}"
android:layout_width="@dimen/icon_size"
android:layout_height="@dimen/icon_size"
android:layout_marginStart="16dp"
android:src="@drawable/users"
android:visibility="@{viewModel.participants.size() > 0 ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@id/participants_list" />
<LinearLayout
android:id="@+id/participants_list"
android:onClick="@{pickParticipantsClickListener}"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:orientation="vertical"
android:layout_marginTop="20dp"
android:layout_marginStart="8dp"
android:layout_marginEnd="16dp"
android:visibility="@{viewModel.participants.size() > 0 ? View.VISIBLE : View.GONE, default=gone}"
app:layout_constraintTop_toBottomOf="@id/participants"
app:layout_constraintStart_toEndOf="@id/participants_list_icon"
app:layout_constraintEnd_toEndOf="parent"
entries="@{viewModel.participants}"
layout="@{@layout/meeting_schedule_participant_list_cell}"/>
<View
android:id="@+id/separator_5"
android:layout_width="0dp"
android:layout_height="1dp"
android:layout_marginTop="16dp"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toBottomOf="@id/participants_list"
android:background="@color/gray_main2_200" />
<com.google.android.material.materialswitch.MaterialSwitch
style="@style/material_switch_style"
android:id="@+id/send_invitations"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="20dp"
android:layout_marginStart="16dp"
android:layout_marginEnd="16dp"
android:text="@string/meeting_schedule_send_invitations_title"
android:textColor="@color/gray_main2_600"
android:textSize="14sp"
android:checked="@={viewModel.sendInvitations}"
app:layout_constraintTop_toBottomOf="@id/separator_5"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toEndOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
</androidx.constraintlayout.widget.ConstraintLayout>
<include
layout="@layout/operation_in_progress"
bind:visibility="@{viewModel.operationInProgress}" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>

View file

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<layout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto">
<data>
<import type="android.view.View" />
<import type="org.linphone.core.ConsolidatedPresence" />
<variable
name="model"
type="org.linphone.ui.main.model.SelectedAddressModel" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.imageview.ShapeableImageView
style="@style/avatar_imageview"
android:id="@+id/avatar"
android:layout_width="@dimen/avatar_list_cell_size"
android:layout_height="@dimen/avatar_list_cell_size"
android:layout_marginStart="12dp"
android:layout_marginTop="5dp"
android:layout_marginBottom="5dp"
coilAvatar="@{model.avatarModel}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/presence_badge"
android:layout_width="@dimen/avatar_presence_badge_size"
android:layout_height="@dimen/avatar_presence_badge_size"
android:layout_marginEnd="@dimen/avatar_presence_badge_end_margin"
android:background="@drawable/led_background"
android:padding="@dimen/avatar_presence_badge_padding"
app:presenceIcon="@{model.avatarModel.presenceStatus}"
android:visibility="@{model.avatarModel.presenceStatus == ConsolidatedPresence.Offline ? View.GONE : View.VISIBLE}"
app:layout_constraintEnd_toEndOf="@id/avatar"
app:layout_constraintBottom_toBottomOf="@id/avatar"/>
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/name"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:text="@{model.avatarModel.name, default=`John Doe`}"
android:textSize="14sp"
android:layout_marginStart="10dp"
app:layout_constraintStart_toEndOf="@id/avatar"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toBottomOf="parent"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>

View file

@ -260,7 +260,15 @@
android:id="@+id/scheduleMeetingFragment"
android:name="org.linphone.ui.main.meetings.fragment.ScheduleMeetingFragment"
android:label="ScheduleMeetingFragment"
tools:layout="@layout/meeting_schedule_fragment"/>
tools:layout="@layout/meeting_schedule_fragment">
<action
android:id="@+id/action_scheduleMeetingFragment_to_addParticipantsFragment"
app:destination="@id/addParticipantsFragment"
app:enterAnim="@anim/slide_in_right"
app:exitAnim="@anim/slide_out_left"
app:popEnterAnim="@anim/slide_in_left"
app:popExitAnim="@anim/slide_out_right" />
</fragment>
<action
android:id="@+id/action_global_scheduleMeetingFragment"
@ -268,5 +276,10 @@
app:enterAnim="@anim/slide_in"
app:launchSingleTop="true"
app:popExitAnim="@anim/slide_out"/>
<fragment
android:id="@+id/addParticipantsFragment"
android:name="org.linphone.ui.main.fragment.AddParticipantsFragment"
android:label="AddParticipantsFragment"
tools:layout="@layout/generic_add_participants_fragment"/>
</navigation>

View file

@ -1,11 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="sliding_pane_left_fragment_width">450dp</dimen>
<dimen name="sliding_pane_right_fragment_width">450dp</dimen>
<dimen name="call_main_actions_menu_height">110dp</dimen>
<dimen name="call_extra_actions_menu_height">125dp</dimen>
<dimen name="call_all_actions_menu_height">235dp</dimen> <!-- sum of above two -->
<dimen name="landscape_nav_bar_width">75dp</dimen>
<dimen name="sliding_pane_left_fragment_width">425dp</dimen>
<!-- This value is the result of the above two added together -->
<dimen name="sliding_pane_left_fragment_with_nav_width">500dp</dimen>
</resources>

View file

@ -5,9 +5,7 @@
<dimen name="screen_bottom_margin">32dp</dimen>
<dimen name="landscape_nav_bar_width">75dp</dimen>
<dimen name="sliding_pane_left_fragment_width">280dp</dimen>
<!-- This value is the result of the above two added together -->
<dimen name="sliding_pane_left_fragment_with_nav_width">355dp</dimen>
<dimen name="sliding_pane_left_fragment_width">300dp</dimen>
<dimen name="sliding_pane_right_fragment_width">300dp</dimen>
<dimen name="small_icon_size">14dp</dimen>

View file

@ -145,6 +145,9 @@
<item name="thumbTint">@color/white</item>
<item name="trackTint">@color/switch_track_color</item>
<item name="trackDecorationTint">@color/transparent_color</item>
<item name="android:fontFamily">@font/noto_sans</item>
<item name="android:textColor">@color/gray_main2_600</item>
<item name="android:textSize">14sp</item>
</style>
<style name="ShapeAppearance.CircularBorder" parent="">
<item name="cornerFamily">rounded</item>