mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Added edit meeting fragment
This commit is contained in:
parent
65f3dd896c
commit
25a0f4b65a
15 changed files with 841 additions and 59 deletions
|
|
@ -121,16 +121,16 @@ class CoreContext @UiThread constructor(val context: Context) : HandlerThread("C
|
|||
@WorkerThread
|
||||
override fun onConfiguringStatus(
|
||||
core: Core,
|
||||
status: Config.ConfiguringState?,
|
||||
status: ConfiguringState?,
|
||||
message: String?
|
||||
) {
|
||||
Log.i("$TAG Configuring state changed [$status]")
|
||||
if (status == Config.ConfiguringState.Successful) {
|
||||
if (status == ConfiguringState.Successful) {
|
||||
val text = context.getString(
|
||||
org.linphone.R.string.assistant_qr_code_provisioning_done
|
||||
)
|
||||
greenToastToShowEvent.postValue(Event(Pair(text, org.linphone.R.drawable.smiley)))
|
||||
} else if (status == Config.ConfiguringState.Failed) {
|
||||
} else if (status == ConfiguringState.Failed) {
|
||||
val text = context.getString(
|
||||
org.linphone.R.string.assistant_qr_code_provisioning_done
|
||||
)
|
||||
|
|
|
|||
|
|
@ -211,8 +211,12 @@ class ConversationInfoFragment : SlidingPaneChildFragment() {
|
|||
}
|
||||
|
||||
binding.setAddParticipantsClickListener {
|
||||
val action = ConversationInfoFragmentDirections.actionConversationInfoFragmentToAddParticipantsFragment()
|
||||
findNavController().navigate(action)
|
||||
if (findNavController().currentDestination?.id == R.id.conversationInfoFragment) {
|
||||
Log.i("$TAG Going into participant picker fragment")
|
||||
val action =
|
||||
ConversationInfoFragmentDirections.actionConversationInfoFragmentToAddParticipantsFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
|
||||
binding.setEditSubjectClickListener {
|
||||
|
|
|
|||
|
|
@ -581,7 +581,7 @@ class MessageModel @WorkerThread constructor(
|
|||
hideYear = false
|
||||
)
|
||||
val startTime = TimestampUtils.timeToString(timestamp)
|
||||
val end = timestamp + (duration * 60)
|
||||
val end = timestamp + duration
|
||||
val endTime = TimestampUtils.timeToString(end)
|
||||
meetingDate.postValue(date)
|
||||
meetingTime.postValue("$startTime - $endTime")
|
||||
|
|
|
|||
|
|
@ -0,0 +1,184 @@
|
|||
/*
|
||||
* Copyright (c) 2010-2023 Belledonne Communications SARL.
|
||||
*
|
||||
* This file is part of linphone-android
|
||||
* (see https://www.linphone.org).
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package org.linphone.ui.main.meetings.fragment
|
||||
|
||||
import android.os.Bundle
|
||||
import android.text.format.DateFormat
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.navigation.fragment.findNavController
|
||||
import androidx.navigation.fragment.navArgs
|
||||
import com.google.android.material.datepicker.CalendarConstraints
|
||||
import com.google.android.material.datepicker.DateValidatorPointForward
|
||||
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.MeetingEditFragmentBinding
|
||||
import org.linphone.ui.main.fragment.SlidingPaneChildFragment
|
||||
import org.linphone.ui.main.meetings.viewmodel.ScheduleMeetingViewModel
|
||||
import org.linphone.utils.Event
|
||||
|
||||
@UiThread
|
||||
class EditMeetingFragment : SlidingPaneChildFragment() {
|
||||
companion object {
|
||||
private const val TAG = "[Edit Meeting Fragment]"
|
||||
}
|
||||
|
||||
private lateinit var binding: MeetingEditFragmentBinding
|
||||
|
||||
private lateinit var viewModel: ScheduleMeetingViewModel
|
||||
|
||||
private val args: EditMeetingFragmentArgs by navArgs()
|
||||
|
||||
override fun onCreateView(
|
||||
inflater: LayoutInflater,
|
||||
container: ViewGroup?,
|
||||
savedInstanceState: Bundle?
|
||||
): View {
|
||||
binding = MeetingEditFragmentBinding.inflate(layoutInflater)
|
||||
return binding.root
|
||||
}
|
||||
|
||||
override fun goBack(): Boolean {
|
||||
return findNavController().popBackStack()
|
||||
}
|
||||
|
||||
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
|
||||
super.onViewCreated(view, savedInstanceState)
|
||||
|
||||
binding.lifecycleOwner = viewLifecycleOwner
|
||||
|
||||
viewModel = ViewModelProvider(this)[ScheduleMeetingViewModel::class.java]
|
||||
binding.viewModel = viewModel
|
||||
|
||||
val conferenceUri = args.conferenceUri
|
||||
Log.i("$TAG Found conference URI [$conferenceUri] in arguments")
|
||||
viewModel.loadExistingConferenceInfoFromUri(conferenceUri)
|
||||
|
||||
binding.setBackClickListener {
|
||||
goBack()
|
||||
}
|
||||
|
||||
binding.setPickStartDateClickListener {
|
||||
val constraintsBuilder =
|
||||
CalendarConstraints.Builder()
|
||||
.setValidator(DateValidatorPointForward.now())
|
||||
val picker =
|
||||
MaterialDatePicker.Builder.datePicker()
|
||||
.setCalendarConstraints(constraintsBuilder.build())
|
||||
.setTitleText(R.string.meeting_schedule_pick_start_date_title)
|
||||
.setSelection(viewModel.getCurrentlySelectedStartDate())
|
||||
.build()
|
||||
picker.addOnPositiveButtonClickListener {
|
||||
val selection = picker.selection
|
||||
if (selection != null) {
|
||||
viewModel.setStartDate(selection)
|
||||
}
|
||||
}
|
||||
picker.show(parentFragmentManager, "Start date picker")
|
||||
}
|
||||
|
||||
binding.setPickEndDateClickListener {
|
||||
val constraintsBuilder =
|
||||
CalendarConstraints.Builder()
|
||||
.setValidator(
|
||||
DateValidatorPointForward.from(viewModel.getCurrentlySelectedStartDate())
|
||||
)
|
||||
val picker =
|
||||
MaterialDatePicker.Builder.datePicker()
|
||||
.setCalendarConstraints(constraintsBuilder.build())
|
||||
.setTitleText(R.string.meeting_schedule_pick_end_date_title)
|
||||
.setSelection(viewModel.getCurrentlySelectedEndDate())
|
||||
.build()
|
||||
picker.addOnPositiveButtonClickListener {
|
||||
val selection = picker.selection
|
||||
if (selection != null) {
|
||||
viewModel.setEndDate(selection)
|
||||
}
|
||||
}
|
||||
picker.show(parentFragmentManager, "End date picker")
|
||||
}
|
||||
|
||||
binding.setPickStartTimeClickListener {
|
||||
val isSystem24Hour = DateFormat.is24HourFormat(requireContext())
|
||||
val clockFormat = if (isSystem24Hour) TimeFormat.CLOCK_24H else TimeFormat.CLOCK_12H
|
||||
val picker =
|
||||
MaterialTimePicker.Builder()
|
||||
.setTimeFormat(clockFormat)
|
||||
.setTitleText(R.string.meeting_schedule_pick_start_time_title)
|
||||
.setHour(viewModel.startHour)
|
||||
.setMinute(viewModel.startMinutes)
|
||||
.build()
|
||||
picker.addOnPositiveButtonClickListener {
|
||||
viewModel.setStartTime(picker.hour, picker.minute)
|
||||
}
|
||||
picker.show(parentFragmentManager, "Start time picker")
|
||||
}
|
||||
|
||||
binding.setPickEndTimeClickListener {
|
||||
val isSystem24Hour = DateFormat.is24HourFormat(
|
||||
requireContext()
|
||||
)
|
||||
val clockFormat = if (isSystem24Hour) TimeFormat.CLOCK_24H else TimeFormat.CLOCK_12H
|
||||
val picker =
|
||||
MaterialTimePicker.Builder()
|
||||
.setTimeFormat(clockFormat)
|
||||
.setTitleText(R.string.meeting_schedule_pick_end_time_title)
|
||||
.setHour(viewModel.endHour)
|
||||
.setMinute(viewModel.endMinutes)
|
||||
.build()
|
||||
picker.addOnPositiveButtonClickListener {
|
||||
viewModel.setEndTime(picker.hour, picker.minute)
|
||||
}
|
||||
picker.show(parentFragmentManager, "End time picker")
|
||||
}
|
||||
|
||||
binding.setPickParticipantsClickListener {
|
||||
if (findNavController().currentDestination?.id == R.id.editMeetingFragment) {
|
||||
Log.i("$TAG Going into participant picker fragment")
|
||||
val action =
|
||||
EditMeetingFragmentDirections.actionEditMeetingFragmentToAddParticipantsFragment()
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -95,6 +95,19 @@ class MeetingFragment : SlidingPaneChildFragment() {
|
|||
goBack()
|
||||
}
|
||||
|
||||
binding.setEditClickListener {
|
||||
val conferenceUri = viewModel.sipUri.value.orEmpty()
|
||||
if (conferenceUri.isNotEmpty()) {
|
||||
Log.i(
|
||||
"$TAG Navigating to meeting edit fragment with conference URI [$conferenceUri]"
|
||||
)
|
||||
val action = MeetingFragmentDirections.actionMeetingFragmentToEditMeetingFragment(
|
||||
conferenceUri
|
||||
)
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
|
||||
binding.setShareClickListener {
|
||||
copyMeetingAddressIntoClipboard(uri)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,9 +158,12 @@ class ScheduleMeetingFragment : GenericFragment() {
|
|||
}
|
||||
|
||||
binding.setPickParticipantsClickListener {
|
||||
Log.i("$TAG Going into participant picker fragment")
|
||||
val action = ScheduleMeetingFragmentDirections.actionScheduleMeetingFragmentToAddParticipantsFragment()
|
||||
findNavController().navigate(action)
|
||||
if (findNavController().currentDestination?.id == R.id.scheduleMeetingFragment) {
|
||||
Log.i("$TAG Going into participant picker fragment")
|
||||
val action =
|
||||
ScheduleMeetingFragmentDirections.actionScheduleMeetingFragmentToAddParticipantsFragment()
|
||||
findNavController().navigate(action)
|
||||
}
|
||||
}
|
||||
|
||||
viewModel.conferenceCreatedEvent.observe(viewLifecycleOwner) {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class MeetingModel @WorkerThread constructor(private val conferenceInfo: Confere
|
|||
|
||||
private val startTime = TimestampUtils.timeToString(timestamp)
|
||||
|
||||
private val endTime = TimestampUtils.timeToString(timestamp + (conferenceInfo.duration * 60))
|
||||
private val endTime = TimestampUtils.timeToString(timestamp + conferenceInfo.duration)
|
||||
|
||||
val time = "$startTime - $endTime"
|
||||
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class MeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
hideYear = false
|
||||
)
|
||||
val startTime = TimestampUtils.timeToString(timestamp)
|
||||
val end = timestamp + (duration * 60)
|
||||
val end = timestamp + duration
|
||||
val endTime = TimestampUtils.timeToString(end)
|
||||
startTimeStamp.postValue(timestamp * 1000)
|
||||
endTimeStamp.postValue(end * 1000)
|
||||
|
|
|
|||
|
|
@ -326,7 +326,7 @@ class MeetingWaitingRoomViewModel @UiThread constructor() : ViewModel() {
|
|||
hideYear = false
|
||||
)
|
||||
val startTime = TimestampUtils.timeToString(timestamp)
|
||||
val end = timestamp + (duration * 60)
|
||||
val end = timestamp + duration
|
||||
val endTime = TimestampUtils.timeToString(end)
|
||||
dateTime.postValue("$date | $startTime - $endTime")
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@
|
|||
*/
|
||||
package org.linphone.ui.main.meetings.viewmodel
|
||||
|
||||
import androidx.annotation.AnyThread
|
||||
import androidx.annotation.UiThread
|
||||
import androidx.annotation.WorkerThread
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
|
|
@ -30,6 +31,7 @@ import org.linphone.LinphoneApplication.Companion.coreContext
|
|||
import org.linphone.R
|
||||
import org.linphone.core.Address
|
||||
import org.linphone.core.ChatRoom
|
||||
import org.linphone.core.ConferenceInfo
|
||||
import org.linphone.core.ConferenceScheduler
|
||||
import org.linphone.core.ConferenceSchedulerListenerStub
|
||||
import org.linphone.core.Factory
|
||||
|
|
@ -85,6 +87,8 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
private lateinit var conferenceScheduler: ConferenceScheduler
|
||||
|
||||
private lateinit var conferenceInfoToEdit: ConferenceInfo
|
||||
|
||||
private val conferenceSchedulerListener = object : ConferenceSchedulerListenerStub() {
|
||||
@WorkerThread
|
||||
override fun onStateChanged(
|
||||
|
|
@ -99,9 +103,16 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
}
|
||||
ConferenceScheduler.State.Ready -> {
|
||||
val conferenceAddress = conferenceScheduler.info?.uri
|
||||
Log.i(
|
||||
"$TAG Conference info created, address will be ${conferenceAddress?.asStringUriOnly()}"
|
||||
)
|
||||
if (::conferenceInfoToEdit.isInitialized) {
|
||||
Log.i(
|
||||
"$TAG Conference info [${conferenceInfoToEdit.uri?.asStringUriOnly()}] has been updated"
|
||||
)
|
||||
} else {
|
||||
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()
|
||||
|
|
@ -179,19 +190,7 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
computeDateLabels()
|
||||
computeTimeLabels()
|
||||
|
||||
timezone.value = AppUtils.getFormattedString(
|
||||
R.string.meeting_schedule_timezone_title,
|
||||
TimeZone.getDefault().displayName.replaceFirstChar {
|
||||
if (it.isLowerCase()) {
|
||||
it.titlecase(
|
||||
Locale.getDefault()
|
||||
)
|
||||
} else {
|
||||
it.toString()
|
||||
}
|
||||
}
|
||||
)
|
||||
updateTimezone()
|
||||
}
|
||||
|
||||
override fun onCleared() {
|
||||
|
|
@ -204,6 +203,64 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun loadExistingConferenceInfoFromUri(conferenceUri: String) {
|
||||
coreContext.postOnCoreThread { core ->
|
||||
val conferenceAddress = core.interpretUrl(conferenceUri, false)
|
||||
if (conferenceAddress == null) {
|
||||
Log.e("$TAG Failed to parse conference URI [$conferenceUri], abort")
|
||||
return@postOnCoreThread
|
||||
}
|
||||
|
||||
val conferenceInfo = core.findConferenceInformationFromUri(conferenceAddress)
|
||||
if (conferenceInfo == null) {
|
||||
Log.e(
|
||||
"$TAG Failed to find a conference info matching URI [${conferenceAddress.asString()}], abort"
|
||||
)
|
||||
return@postOnCoreThread
|
||||
}
|
||||
|
||||
conferenceInfoToEdit = conferenceInfo
|
||||
Log.i(
|
||||
"$TAG Found conference info matching URI [${conferenceInfo.uri?.asString()}] with subject [${conferenceInfo.subject}]"
|
||||
)
|
||||
subject.postValue(conferenceInfo.subject)
|
||||
description.postValue(conferenceInfo.description)
|
||||
|
||||
isBroadcastSelected.postValue(false) // TODO FIXME
|
||||
|
||||
startHour = 0
|
||||
startMinutes = 0
|
||||
endHour = 0
|
||||
endMinutes = 0
|
||||
startTimestamp = conferenceInfo.dateTime * 1000 /* Linphone timestamps are in seconds */
|
||||
endTimestamp = (conferenceInfo.dateTime + conferenceInfo.duration) * 1000 /* Linphone timestamps are in seconds */
|
||||
Log.i(
|
||||
"$TAG Loaded start date is [$startTimestamp], loaded end date is [$endTimestamp]"
|
||||
)
|
||||
computeDateLabels()
|
||||
computeTimeLabels()
|
||||
updateTimezone()
|
||||
|
||||
val list = arrayListOf<SelectedAddressModel>()
|
||||
for (participant in conferenceInfo.participantInfos) {
|
||||
val address = participant.address
|
||||
val avatarModel = coreContext.contactsManager.getContactAvatarModelForAddress(
|
||||
address
|
||||
)
|
||||
val model = SelectedAddressModel(address, avatarModel) {
|
||||
// onRemoveFromSelection
|
||||
}
|
||||
list.add(model)
|
||||
Log.i("$TAG Loaded participant [${address.asStringUriOnly()}]")
|
||||
}
|
||||
Log.i(
|
||||
"$TAG [${list.size}] participants loaded from found conference info"
|
||||
)
|
||||
participants.postValue(list)
|
||||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun getCurrentlySelectedStartDate(): Long {
|
||||
return startTimestamp
|
||||
|
|
@ -292,6 +349,8 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO FIXME handle speakers when in broadcast mode
|
||||
|
||||
@UiThread
|
||||
fun schedule() {
|
||||
coreContext.postOnCoreThread { core ->
|
||||
|
|
@ -339,12 +398,64 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
}
|
||||
|
||||
conferenceScheduler.account = localAccount
|
||||
// Will trigger the conference creation/update automatically
|
||||
// Will trigger the conference creation automatically
|
||||
conferenceScheduler.info = conferenceInfo
|
||||
}
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun update() {
|
||||
coreContext.postOnCoreThread { core ->
|
||||
Log.i(
|
||||
"$TAG Updating ${if (isBroadcastSelected.value == true) "broadcast" else "meeting"}"
|
||||
)
|
||||
if (!::conferenceInfoToEdit.isInitialized) {
|
||||
Log.e("No conference info to edit found!")
|
||||
return@postOnCoreThread
|
||||
}
|
||||
|
||||
operationInProgress.postValue(true)
|
||||
|
||||
val conferenceInfo = conferenceInfoToEdit
|
||||
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)
|
||||
}
|
||||
|
||||
// Will trigger the conference update automatically
|
||||
conferenceScheduler.info = conferenceInfo
|
||||
}
|
||||
}
|
||||
|
||||
@AnyThread
|
||||
private fun computeDateLabels() {
|
||||
val start = TimestampUtils.toString(
|
||||
startTimestamp,
|
||||
|
|
@ -353,7 +464,7 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
shortDate = false,
|
||||
hideYear = false
|
||||
)
|
||||
fromDate.value = start
|
||||
fromDate.postValue(start)
|
||||
Log.i("$TAG Computed start date for timestamp [$startTimestamp] is [$start]")
|
||||
|
||||
val end = TimestampUtils.toString(
|
||||
|
|
@ -363,25 +474,47 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
shortDate = false,
|
||||
hideYear = false
|
||||
)
|
||||
toDate.value = end
|
||||
toDate.postValue(end)
|
||||
Log.i("$TAG Computed end date for timestamp [$endTimestamp] is [$end]")
|
||||
}
|
||||
|
||||
@UiThread
|
||||
@AnyThread
|
||||
private fun computeTimeLabels() {
|
||||
val cal = Calendar.getInstance()
|
||||
cal.timeInMillis = startTimestamp
|
||||
cal.set(Calendar.HOUR_OF_DAY, startHour)
|
||||
cal.set(Calendar.MINUTE, startMinutes)
|
||||
if (startHour != 0 && startMinutes != 0) {
|
||||
cal.set(Calendar.HOUR_OF_DAY, startHour)
|
||||
cal.set(Calendar.MINUTE, startMinutes)
|
||||
}
|
||||
val start = TimestampUtils.timeToString(cal.timeInMillis, timestampInSecs = false)
|
||||
Log.i("$TAG Computed start time for timestamp [$startTimestamp] is [$start]")
|
||||
fromTime.value = start
|
||||
fromTime.postValue(start)
|
||||
|
||||
cal.timeInMillis = endTimestamp
|
||||
cal.set(Calendar.HOUR_OF_DAY, endHour)
|
||||
cal.set(Calendar.MINUTE, endMinutes)
|
||||
if (endHour != 0 && endMinutes != 0) {
|
||||
cal.set(Calendar.HOUR_OF_DAY, endHour)
|
||||
cal.set(Calendar.MINUTE, endMinutes)
|
||||
}
|
||||
val end = TimestampUtils.timeToString(cal.timeInMillis, timestampInSecs = false)
|
||||
Log.i("$TAG Computed end time for timestamp [$endTimestamp] is [$end]")
|
||||
toTime.value = end
|
||||
toTime.postValue(end)
|
||||
}
|
||||
|
||||
@AnyThread
|
||||
private fun updateTimezone() {
|
||||
timezone.postValue(
|
||||
AppUtils.getFormattedString(
|
||||
R.string.meeting_schedule_timezone_title,
|
||||
TimeZone.getDefault().displayName.replaceFirstChar {
|
||||
if (it.isLowerCase()) {
|
||||
it.titlecase(
|
||||
Locale.getDefault()
|
||||
)
|
||||
} else {
|
||||
it.toString()
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
415
app/src/main/res/layout/meeting_edit_fragment.xml
Normal file
415
app/src/main/res/layout/meeting_edit_fragment.xml
Normal file
|
|
@ -0,0 +1,415 @@
|
|||
<?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"
|
||||
xmlns:bind="http://schemas.android.com/tools">
|
||||
|
||||
<data>
|
||||
<import type="android.view.View" />
|
||||
<variable
|
||||
name="backClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="pickStartDateClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="pickEndDateClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="pickStartTimeClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<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.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/color_main2_000">
|
||||
|
||||
<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="?attr/color_main1_500"
|
||||
app:layout_constraintBottom_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="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_edit_title"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
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">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<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="?attr/color_main2_600"
|
||||
android:text="@={viewModel.subject}"
|
||||
android:textSize="20sp"
|
||||
android:textColor="?attr/color_main2_600"
|
||||
android:inputType="text|textCapSentences"
|
||||
android:drawableStart="@{viewModel.isBroadcastSelected ? @drawable/slideshow : @drawable/meeting, default=@drawable/meeting}"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_main2_600"
|
||||
android:background="@color/transparent_color"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
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="?attr/color_main2_200" />
|
||||
|
||||
<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/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="?attr/color_main2_600"
|
||||
android:textSize="14sp"
|
||||
android:drawableStart="@drawable/clock"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_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/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="?attr/color_main2_600"
|
||||
app:layout_constraintStart_toStartOf="@id/all_day"
|
||||
app:layout_constraintTop_toBottomOf="@id/all_day_switch" />
|
||||
|
||||
<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="?attr/color_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.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="?attr/color_main2_600"
|
||||
android:visibility="@{viewModel.allDayMeeting ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintStart_toStartOf="@id/from_date"
|
||||
app:layout_constraintTop_toBottomOf="@id/from_date" />
|
||||
|
||||
<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="?attr/color_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/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="?attr/color_main2_600"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="1"
|
||||
android:ellipsize="end"
|
||||
android:drawableStart="@drawable/globe_hemisphere_west"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_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/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="?attr/color_main2_600"
|
||||
android:textSize="14sp"
|
||||
android:drawableStart="@drawable/arrow_clockwise"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_main2_600"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/timezone" />
|
||||
|
||||
<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="?attr/color_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="?attr/color_main2_600"
|
||||
android:text="@={viewModel.description}"
|
||||
android:textSize="14sp"
|
||||
android:textColor="?attr/color_main2_600"
|
||||
android:inputType="text|textCapSentences"
|
||||
android:drawableStart="@drawable/file_text"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_main2_600"
|
||||
android:background="@color/transparent_color"
|
||||
app:layout_constraintTop_toBottomOf="@id/separator_2"
|
||||
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="?attr/color_main2_200" />
|
||||
|
||||
<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="?attr/color_main2_600"
|
||||
android:textSize="14sp"
|
||||
android:drawableStart="@drawable/user_square"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_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" />
|
||||
|
||||
<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="?attr/color_main2_200" />
|
||||
|
||||
<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="?attr/color_main2_600"
|
||||
android:textSize="14sp"
|
||||
android:drawableStart="@drawable/users"
|
||||
android:drawablePadding="8dp"
|
||||
android:drawableTint="?attr/color_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="10dp"
|
||||
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}"/>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style_300"
|
||||
android:id="@+id/add_more_participants"
|
||||
android:onClick="@{pickParticipantsClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="10dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:text="@string/meeting_schedule_add_more_participants_title"
|
||||
android:visibility="@{viewModel.participants.size() > 0 ? View.VISIBLE : View.GONE, default=gone}"
|
||||
app:layout_constraintTop_toBottomOf="@id/participants_list"
|
||||
app:layout_constraintStart_toEndOf="@id/participants_list_icon" />
|
||||
|
||||
<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/add_more_participants"
|
||||
android:background="?attr/color_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>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/save_changes"
|
||||
android:onClick="@{() -> viewModel.update()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/check"
|
||||
app:tint="?attr/color_on_main"
|
||||
app:backgroundTint="?attr/color_main1_500"
|
||||
app:shapeAppearanceOverlay="@style/rounded" />
|
||||
|
||||
<include
|
||||
layout="@layout/operation_in_progress"
|
||||
bind:visibility="@{viewModel.operationInProgress}" />
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
</layout>
|
||||
|
|
@ -7,6 +7,9 @@
|
|||
<variable
|
||||
name="backClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="editClickListener"
|
||||
type="View.OnClickListener" />
|
||||
<variable
|
||||
name="menuClickListener"
|
||||
type="View.OnClickListener" />
|
||||
|
|
@ -53,12 +56,13 @@
|
|||
|
||||
<ImageView
|
||||
android:id="@+id/edit"
|
||||
android:onClick="@{editClickListener}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="0dp"
|
||||
android:padding="15dp"
|
||||
android:adjustViewBounds="true"
|
||||
android:src="@drawable/pencil_simple"
|
||||
android:visibility="@{viewModel.isEditable ? View.VISIBLE : View.GONE, default=gone}"
|
||||
android:visibility="@{viewModel.isEditable ? View.VISIBLE : View.GONE}"
|
||||
app:tint="@color/primary_color_selector"
|
||||
app:layout_constraintStart_toEndOf="@id/title"
|
||||
app:layout_constraintEnd_toStartOf="@id/menu"
|
||||
|
|
|
|||
|
|
@ -66,12 +66,11 @@
|
|||
android:id="@+id/scrollView"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:fillViewport="true"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/title"
|
||||
app:layout_constraintBottom_toTopOf="@id/schedule">
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
|
|
@ -531,25 +530,20 @@
|
|||
|
||||
</ScrollView>
|
||||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/primary_button_label_style"
|
||||
android:id="@+id/schedule"
|
||||
android:onClick="@{() -> viewModel.schedule()}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:paddingStart="20dp"
|
||||
android:paddingEnd="20dp"
|
||||
android:text="@string/meeting_schedule_create_title"
|
||||
app:layout_constraintWidth_max="@dimen/button_max_width"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
<com.google.android.material.floatingactionbutton.FloatingActionButton
|
||||
android:id="@+id/schedule"
|
||||
android:onClick="@{() -> viewModel.schedule()}"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="end|bottom"
|
||||
android:layout_margin="16dp"
|
||||
android:src="@drawable/check"
|
||||
app:tint="?attr/color_on_main"
|
||||
app:backgroundTint="?attr/color_main1_500"
|
||||
app:shapeAppearanceOverlay="@style/rounded" />
|
||||
|
||||
<include
|
||||
layout="@layout/operation_in_progress"
|
||||
bind:visibility="@{viewModel.operationInProgress}" />
|
||||
|
|
|
|||
|
|
@ -24,11 +24,42 @@
|
|||
app:destination="@id/emptyFragment"
|
||||
app:popUpTo="@id/meetingFragment"
|
||||
app:popUpToInclusive="true" />
|
||||
<action
|
||||
android:id="@+id/action_meetingFragment_to_editMeetingFragment"
|
||||
app:destination="@id/editMeetingFragment"
|
||||
app:launchSingleTop="true"
|
||||
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_meetingFragment"
|
||||
app:destination="@id/meetingFragment"
|
||||
app:launchSingleTop="true" />
|
||||
app:launchSingleTop="true"/>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/editMeetingFragment"
|
||||
android:name="org.linphone.ui.main.meetings.fragment.EditMeetingFragment"
|
||||
android:label="EditMeetingFragment"
|
||||
tools:layout="@layout/meeting_edit_fragment">
|
||||
<argument
|
||||
android:name="conferenceUri"
|
||||
app:argType="string" />
|
||||
<action
|
||||
android:id="@+id/action_editMeetingFragment_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>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/addParticipantsFragment"
|
||||
android:name="org.linphone.ui.main.fragment.AddParticipantsFragment"
|
||||
android:label="AddParticipantsFragment"
|
||||
tools:layout="@layout/generic_add_participants_fragment"/>
|
||||
|
||||
</navigation>
|
||||
|
|
@ -489,6 +489,7 @@
|
|||
<string name="meeting_info_deleted_toast">Meeting has been deleted</string>
|
||||
<string name="meeting_schedule_description_title">Description</string>
|
||||
<string name="meeting_schedule_create_title">Create</string>
|
||||
<string name="meeting_schedule_edit_title">Edit meeting</string>
|
||||
|
||||
<string name="meeting_waiting_room_join">Join</string>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue