mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Started meeting scheduler UI
This commit is contained in:
parent
7c28c37d0b
commit
5531dabae4
9 changed files with 605 additions and 11 deletions
|
|
@ -20,12 +20,19 @@
|
|||
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 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.databinding.MeetingScheduleFragmentBinding
|
||||
import org.linphone.ui.main.fragment.GenericFragment
|
||||
import org.linphone.ui.main.meetings.viewmodel.ScheduleMeetingViewModel
|
||||
|
|
@ -73,5 +80,79 @@ class ScheduleMeetingFragment : GenericFragment() {
|
|||
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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,6 +22,13 @@ package org.linphone.ui.main.meetings.viewmodel
|
|||
import androidx.annotation.UiThread
|
||||
import androidx.lifecycle.MutableLiveData
|
||||
import androidx.lifecycle.ViewModel
|
||||
import java.util.Calendar
|
||||
import java.util.Locale
|
||||
import java.util.TimeZone
|
||||
import org.linphone.R
|
||||
import org.linphone.core.tools.Log
|
||||
import org.linphone.utils.AppUtils
|
||||
import org.linphone.utils.TimestampUtils
|
||||
|
||||
class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
||||
companion object {
|
||||
|
|
@ -34,9 +41,119 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
|
||||
val showBroadcastHelp = MutableLiveData<Boolean>()
|
||||
|
||||
val subject = MutableLiveData<String>()
|
||||
|
||||
val description = MutableLiveData<String>()
|
||||
|
||||
val allDayMeeting = MutableLiveData<Boolean>()
|
||||
|
||||
val fromDate = MutableLiveData<String>()
|
||||
|
||||
val toDate = MutableLiveData<String>()
|
||||
|
||||
val fromTime = MutableLiveData<String>()
|
||||
|
||||
val toTime = MutableLiveData<String>()
|
||||
|
||||
val timezone = MutableLiveData<String>()
|
||||
|
||||
val sendInvitations = MutableLiveData<Boolean>()
|
||||
|
||||
private var startTimestamp = 0L
|
||||
private var endTimestamp = 0L
|
||||
|
||||
internal var startHour = 0
|
||||
internal var startMinutes = 0
|
||||
|
||||
internal var endHour = 0
|
||||
internal var endMinutes = 0
|
||||
|
||||
init {
|
||||
isBroadcastSelected.value = false
|
||||
showBroadcastHelp.value = false
|
||||
allDayMeeting.value = false
|
||||
|
||||
val now = System.currentTimeMillis()
|
||||
val cal = Calendar.getInstance()
|
||||
cal.timeInMillis = now
|
||||
cal.add(Calendar.HOUR, 1)
|
||||
cal.set(Calendar.MINUTE, 0)
|
||||
cal.set(Calendar.SECOND, 0)
|
||||
val nextFullHour = cal.timeInMillis
|
||||
startHour = cal.get(Calendar.HOUR_OF_DAY)
|
||||
startMinutes = 0
|
||||
|
||||
cal.add(Calendar.HOUR, 1)
|
||||
val twoHoursLater = cal.timeInMillis
|
||||
endHour = cal.get(Calendar.HOUR_OF_DAY)
|
||||
endMinutes = 0
|
||||
|
||||
startTimestamp = nextFullHour
|
||||
endTimestamp = twoHoursLater
|
||||
|
||||
Log.i(
|
||||
"$TAG Default start time is [$startHour:$startMinutes], default end time is [$startHour:$startMinutes]"
|
||||
)
|
||||
Log.i("$TAG Default start date is [$startTimestamp], default end date is [$endTimestamp]")
|
||||
|
||||
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()
|
||||
}
|
||||
}
|
||||
)
|
||||
sendInvitations.value = true
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun getCurrentlySelectedStartDate(): Long {
|
||||
return startTimestamp
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun setStartDate(timestamp: Long) {
|
||||
startTimestamp = timestamp
|
||||
endTimestamp = timestamp
|
||||
computeDateLabels()
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun getCurrentlySelectedEndDate(): Long {
|
||||
return endTimestamp
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun setEndDate(timestamp: Long) {
|
||||
endTimestamp = timestamp
|
||||
computeDateLabels()
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun setStartTime(hours: Int, minutes: Int) {
|
||||
startHour = hours
|
||||
startMinutes = minutes
|
||||
|
||||
endHour = hours + 1
|
||||
endMinutes = minutes
|
||||
|
||||
computeTimeLabels()
|
||||
}
|
||||
|
||||
@UiThread
|
||||
fun setEndTime(hours: Int, minutes: Int) {
|
||||
endHour = hours
|
||||
endMinutes = minutes
|
||||
|
||||
computeTimeLabels()
|
||||
}
|
||||
|
||||
@UiThread
|
||||
|
|
@ -55,4 +172,45 @@ class ScheduleMeetingViewModel @UiThread constructor() : ViewModel() {
|
|||
fun closeBroadcastHelp() {
|
||||
showBroadcastHelp.value = false
|
||||
}
|
||||
|
||||
@UiThread
|
||||
private fun computeDateLabels() {
|
||||
val start = TimestampUtils.toString(
|
||||
startTimestamp,
|
||||
onlyDate = true,
|
||||
timestampInSecs = false,
|
||||
shortDate = false,
|
||||
hideYear = false
|
||||
)
|
||||
fromDate.value = start
|
||||
Log.i("$TAG Computed start date for timestamp [$startTimestamp] is [$start]")
|
||||
|
||||
val end = TimestampUtils.toString(
|
||||
endTimestamp,
|
||||
onlyDate = true,
|
||||
timestampInSecs = false,
|
||||
shortDate = false,
|
||||
hideYear = false
|
||||
)
|
||||
toDate.value = end
|
||||
Log.i("$TAG Computed end date for timestamp [$endTimestamp] is [$end]")
|
||||
}
|
||||
|
||||
@UiThread
|
||||
private fun computeTimeLabels() {
|
||||
val cal = Calendar.getInstance()
|
||||
cal.timeInMillis = startTimestamp
|
||||
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
|
||||
|
||||
cal.timeInMillis = endTimestamp
|
||||
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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,10 @@ import java.text.DateFormat
|
|||
import java.text.Format
|
||||
import java.text.SimpleDateFormat
|
||||
import java.time.format.TextStyle
|
||||
import java.util.*
|
||||
import java.util.Calendar
|
||||
import java.util.Date
|
||||
import java.util.Locale
|
||||
import java.util.TimeZone
|
||||
import org.linphone.LinphoneApplication.Companion.coreContext
|
||||
|
||||
class TimestampUtils {
|
||||
|
|
@ -146,7 +149,7 @@ class TimestampUtils {
|
|||
shortDate: Boolean = true,
|
||||
hideYear: Boolean = true
|
||||
): String {
|
||||
val dateFormat = if (isToday(timestamp, timestampInSecs)) {
|
||||
val dateFormat = if (!onlyDate && isToday(timestamp, timestampInSecs)) {
|
||||
DateFormat.getTimeInstance(DateFormat.SHORT)
|
||||
} else {
|
||||
if (onlyDate) {
|
||||
|
|
@ -159,7 +162,7 @@ class TimestampUtils {
|
|||
}
|
||||
} as SimpleDateFormat
|
||||
|
||||
if (hideYear || isSameYear(timestamp, timestampInSecs)) {
|
||||
if (hideYear) {
|
||||
// Remove the year part of the format
|
||||
dateFormat.applyPattern(
|
||||
dateFormat.toPattern().replace(
|
||||
|
|
|
|||
9
app/src/main/res/drawable/arrow_clockwise.xml
Normal file
9
app/src/main/res/drawable/arrow_clockwise.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M240,56v48a8,8 0,0 1,-8 8H184a8,8 0,0 1,0 -16H211.4L184.81,71.64l-0.25,-0.24a80,80 0,1 0,-1.67 114.78,8 8,0 0,1 11,11.63A95.44,95.44 0,0 1,128 224h-1.32A96,96 0,1 1,195.75 60L224,85.8V56a8,8 0,1 1,16 0Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/file_text.xml
Normal file
9
app/src/main/res/drawable/file_text.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M213.66,82.34l-56,-56A8,8 0,0 0,152 24L56,24A16,16 0,0 0,40 40L40,216a16,16 0,0 0,16 16L200,232a16,16 0,0 0,16 -16L216,88A8,8 0,0 0,213.66 82.34ZM160,51.31 L188.69,80L160,80ZM200,216L56,216L56,40h88L144,88a8,8 0,0 0,8 8h48L200,216ZM168,136a8,8 0,0 1,-8 8L96,144a8,8 0,0 1,0 -16h64A8,8 0,0 1,168 136ZM168,168a8,8 0,0 1,-8 8L96,176a8,8 0,0 1,0 -16h64A8,8 0,0 1,168 168Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/user_square.xml
Normal file
9
app/src/main/res/drawable/user_square.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M208,32H48A16,16 0,0 0,32 48V208a16,16 0,0 0,16 16H208a16,16 0,0 0,16 -16V48A16,16 0,0 0,208 32ZM96,120a32,32 0,1 1,32 32A32,32 0,0 1,96 120ZM68.67,208A64.36,64.36 0,0 1,87.8 182.2a64,64 0,0 1,80.4 0A64.36,64.36 0,0 1,187.33 208ZM208,208h-3.67a79.9,79.9 0,0 0,-46.68 -50.29,48 48,0 1,0 -59.3,0A79.9,79.9 0,0 0,51.67 208H48V48H208V208Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
9
app/src/main/res/drawable/users.xml
Normal file
9
app/src/main/res/drawable/users.xml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="256"
|
||||
android:viewportHeight="256">
|
||||
<path
|
||||
android:pathData="M117.25,157.92a60,60 0,1 0,-66.5 0A95.83,95.83 0,0 0,3.53 195.63a8,8 0,1 0,13.4 8.74,80 80,0 0,1 134.14,0 8,8 0,0 0,13.4 -8.74A95.83,95.83 0,0 0,117.25 157.92ZM40,108a44,44 0,1 1,44 44A44.05,44.05 0,0 1,40 108ZM250.14,206.7a8,8 0,0 1,-11.07 -2.33A79.83,79.83 0,0 0,172 168a8,8 0,0 1,0 -16,44 44,0 1,0 -16.34,-84.87 8,8 0,1 1,-5.94 -14.85,60 60,0 0,1 55.53,105.64 95.83,95.83 0,0 1,47.22 37.71A8,8 0,0 1,250.14 206.7Z"
|
||||
android:fillColor="#4e6074"/>
|
||||
</vector>
|
||||
|
|
@ -7,6 +7,18 @@
|
|||
<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="viewModel"
|
||||
type="org.linphone.ui.main.meetings.viewmodel.ScheduleMeetingViewModel" />
|
||||
|
|
@ -61,25 +73,25 @@
|
|||
|
||||
<androidx.appcompat.widget.AppCompatTextView
|
||||
style="@style/default_text_style"
|
||||
android:id="@+id/meeting"
|
||||
android:onClick="@{() -> viewModel.selectMeeting()}"
|
||||
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="@{viewModel.isBroadcastSelected ? @color/secondary_button_label_color : @color/primary_button_label_color, default=@color/primary_button_label_color}"
|
||||
android:textColor="@color/primary_button_label_color"
|
||||
android:textSize="16sp"
|
||||
android:gravity="center"
|
||||
android:drawableStart="@drawable/users_three"
|
||||
android:drawableTint="@{viewModel.isBroadcastSelected ? @color/secondary_button_label_color : @color/primary_button_label_color, default=@color/primary_button_label_color}"
|
||||
android:drawableTint="@color/primary_button_label_color"
|
||||
android:drawablePadding="5dp"
|
||||
android:background="@{viewModel.isBroadcastSelected ? @drawable/secondary_button_background : @drawable/primary_button_background, default=@drawable/primary_button_background}"
|
||||
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_toBottomOf="@id/title"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/broadcast"/>
|
||||
|
|
@ -94,18 +106,70 @@
|
|||
android:layout_marginStart="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/meeting_schedule_broadcast_label"
|
||||
android:textColor="@{viewModel.isBroadcastSelected ? @color/primary_button_label_color : @color/secondary_button_label_color, default=@color/secondary_button_label_color}"
|
||||
android:textColor="@color/secondary_button_label_color"
|
||||
android:textSize="16sp"
|
||||
android:gravity="center"
|
||||
android:drawableStart="@drawable/slideshow"
|
||||
android:drawableTint="@{viewModel.isBroadcastSelected ? @color/primary_button_label_color : @color/secondary_button_label_color, default=@color/secondary_button_label_color}"
|
||||
android:drawableTint="@color/secondary_button_label_color"
|
||||
android:drawablePadding="5dp"
|
||||
android:background="@{viewModel.isBroadcastSelected ? @drawable/primary_button_background : @drawable/secondary_button_background, default=@drawable/secondary_button_background}"
|
||||
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_toBottomOf="@id/title"
|
||||
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"/>
|
||||
|
||||
|
|
@ -154,11 +218,14 @@
|
|||
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"
|
||||
|
|
@ -174,6 +241,244 @@
|
|||
app:layout_constraintTop_toBottomOf="@id/subject"
|
||||
android:background="@color/gray_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="@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/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" />
|
||||
|
||||
<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.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" />
|
||||
|
||||
<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/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/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" />
|
||||
|
||||
<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.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" />
|
||||
|
||||
<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_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" />
|
||||
|
||||
<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/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_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" />
|
||||
|
||||
<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" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
|
|
|||
|
|
@ -337,6 +337,17 @@
|
|||
<string name="meeting_schedule_broadcast_label">Broadcast</string>
|
||||
<string name="meeting_schedule_broadcast_help">Info about broadcast. <u>Learn more</u></string>
|
||||
<string name="meeting_schedule_subject_hint">Add title…</string>
|
||||
<string name="meeting_schedule_date_all_day_title">All day</string>
|
||||
<string name="meeting_schedule_pick_start_date_title">Choose the start date</string>
|
||||
<string name="meeting_schedule_pick_end_date_title">Choose the end date</string>
|
||||
<string name="meeting_schedule_pick_start_time_title">Choose the start time</string>
|
||||
<string name="meeting_schedule_pick_end_time_title">Choose the end time</string>
|
||||
<string name="meeting_schedule_timezone_title">Timezone: %s</string>
|
||||
<string name="meeting_schedule_one_time_label">One time</string>
|
||||
<string name="meeting_schedule_description_hint">Add description</string>
|
||||
<string name="meeting_schedule_add_participants_title">Add participants</string>
|
||||
<string name="meeting_schedule_add_speaker_title">Add speaker</string>
|
||||
<string name="meeting_schedule_send_invitations_title">Send invitation to participants</string>
|
||||
|
||||
<string name="operation_in_progress_overlay">Operation in progress, please wait</string>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue