diff --git a/app/src/main/java/org/linphone/activities/call/viewmodels/ControlsViewModel.kt b/app/src/main/java/org/linphone/activities/call/viewmodels/ControlsViewModel.kt index 0fc445bb7..29ebe417f 100644 --- a/app/src/main/java/org/linphone/activities/call/viewmodels/ControlsViewModel.kt +++ b/app/src/main/java/org/linphone/activities/call/viewmodels/ControlsViewModel.kt @@ -85,6 +85,8 @@ class ControlsViewModel : ViewModel() { val somethingClickedEvent = MutableLiveData>() + val chatAllowed = !LinphoneApplication.corePreferences.disableChat + private val vibrator = coreContext.context.getSystemService(Context.VIBRATOR_SERVICE) as Vibrator val onKeyClick: NumpadDigitListener = object : NumpadDigitListener { diff --git a/app/src/main/java/org/linphone/activities/main/MainActivity.kt b/app/src/main/java/org/linphone/activities/main/MainActivity.kt index 6a9d2cfb7..5fb4b67c9 100644 --- a/app/src/main/java/org/linphone/activities/main/MainActivity.kt +++ b/app/src/main/java/org/linphone/activities/main/MainActivity.kt @@ -220,6 +220,8 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin findNavController(R.id.nav_host_fragment).navigate(Uri.parse(deepLink)) } intent.hasExtra("Chat") -> { + if (corePreferences.disableChat) return + val deepLink = if (intent.hasExtra("RemoteSipUri") && intent.hasExtra("LocalSipUri")) { val peerAddress = intent.getStringExtra("RemoteSipUri") val localAddress = intent.getStringExtra("LocalSipUri") @@ -262,6 +264,8 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin } private fun handleSendText(intent: Intent) { + if (corePreferences.disableChat) return + intent.getStringExtra(Intent.EXTRA_TEXT)?.let { sharedViewModel.textToShare.value = it } @@ -270,6 +274,8 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin } private suspend fun handleSendFile(intent: Intent) { + if (corePreferences.disableChat) return + (intent.getParcelableExtra(Intent.EXTRA_STREAM) as? Uri)?.let { val list = arrayListOf() coroutineScope { @@ -289,6 +295,8 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin } private suspend fun handleSendMultipleFiles(intent: Intent) { + if (corePreferences.disableChat) return + intent.getParcelableArrayListExtra(Intent.EXTRA_STREAM)?.let { val list = arrayListOf() coroutineScope { @@ -310,6 +318,8 @@ class MainActivity : GenericActivity(), SnackBarActivity, NavController.OnDestin } private fun handleSendChatRoom(intent: Intent) { + if (corePreferences.disableChat) return + val uri = intent.data if (uri != null) { Log.i("[Main Activity] Found uri: $uri to send a message to") diff --git a/app/src/main/java/org/linphone/activities/main/contact/viewmodels/ContactNumberOrAddressViewModel.kt b/app/src/main/java/org/linphone/activities/main/contact/viewmodels/ContactNumberOrAddressViewModel.kt index 5bbc92baa..c51097c6d 100644 --- a/app/src/main/java/org/linphone/activities/main/contact/viewmodels/ContactNumberOrAddressViewModel.kt +++ b/app/src/main/java/org/linphone/activities/main/contact/viewmodels/ContactNumberOrAddressViewModel.kt @@ -20,6 +20,7 @@ package org.linphone.activities.main.contact.viewmodels import androidx.lifecycle.ViewModel +import org.linphone.LinphoneApplication.Companion.corePreferences import org.linphone.core.Address class ContactNumberOrAddressViewModel( @@ -32,6 +33,8 @@ class ContactNumberOrAddressViewModel( ) : ViewModel() { val showInvite = !hasPresence && !isSip + val chatAllowed = !corePreferences.disableChat + fun startCall() { address ?: return listener.onCall(address) diff --git a/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt b/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt index a44e8751c..82a361666 100644 --- a/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt +++ b/app/src/main/java/org/linphone/activities/main/history/viewmodels/CallLogViewModel.kt @@ -25,6 +25,7 @@ import androidx.lifecycle.ViewModelProvider import java.text.SimpleDateFormat import java.util.* import kotlin.collections.ArrayList +import org.linphone.LinphoneApplication.Companion.corePreferences import org.linphone.R import org.linphone.contact.GenericContactViewModel import org.linphone.core.* @@ -105,6 +106,8 @@ class CallLogViewModel(val callLog: CallLog) : GenericContactViewModel(callLog.r val waitForChatRoomCreation = MutableLiveData() + val chatAllowed = !corePreferences.disableChat + val secureChatAllowed = contact.value?.friend?.getPresenceModelForUriOrTel(peerSipUri)?.hasCapability(FriendCapability.LimeX3Dh) ?: false val relatedCallLogs = MutableLiveData>() diff --git a/app/src/main/java/org/linphone/activities/main/viewmodels/TabsViewModel.kt b/app/src/main/java/org/linphone/activities/main/viewmodels/TabsViewModel.kt index 30d567687..2480b58e7 100644 --- a/app/src/main/java/org/linphone/activities/main/viewmodels/TabsViewModel.kt +++ b/app/src/main/java/org/linphone/activities/main/viewmodels/TabsViewModel.kt @@ -22,12 +22,17 @@ package org.linphone.activities.main.viewmodels import androidx.lifecycle.MutableLiveData import androidx.lifecycle.ViewModel import org.linphone.LinphoneApplication.Companion.coreContext +import org.linphone.LinphoneApplication.Companion.corePreferences import org.linphone.core.* class TabsViewModel : ViewModel() { val unreadMessagesCount = MutableLiveData() val missedCallsCount = MutableLiveData() + val leftAnchor = MutableLiveData() + val middleAnchor = MutableLiveData() + val rightAnchor = MutableLiveData() + private val listener: CoreListenerStub = object : CoreListenerStub() { override fun onCallStateChanged( core: Core, @@ -58,6 +63,16 @@ class TabsViewModel : ViewModel() { init { coreContext.core.addListener(listener) + if (corePreferences.disableChat) { + leftAnchor.value = 1 / 3F + middleAnchor.value = 2 / 3F + rightAnchor.value = 1F + } else { + leftAnchor.value = 0.25F + middleAnchor.value = 0.5F + rightAnchor.value = 0.75F + } + updateUnreadChatCount() updateMissedCallCount() } @@ -72,6 +87,6 @@ class TabsViewModel : ViewModel() { } fun updateUnreadChatCount() { - unreadMessagesCount.value = coreContext.core.unreadChatMessageCountFromActiveLocals + unreadMessagesCount.value = if (corePreferences.disableChat) 0 else coreContext.core.unreadChatMessageCountFromActiveLocals } } diff --git a/app/src/main/java/org/linphone/core/CorePreferences.kt b/app/src/main/java/org/linphone/core/CorePreferences.kt index 3414e8f8f..a15b1dc73 100644 --- a/app/src/main/java/org/linphone/core/CorePreferences.kt +++ b/app/src/main/java/org/linphone/core/CorePreferences.kt @@ -311,6 +311,10 @@ class CorePreferences constructor(private val context: Context) { val dtmfKeypadVibration: Boolean get() = config.getBool("app", "dtmf_keypad_vibraton", false) + // Will disable chat feature completely + val disableChat: Boolean + get() = config.getBool("app", "disable_chat_feature", false) + /* Assistant */ val showCreateAccount: Boolean diff --git a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt index 0045ada2a..68acc8fb1 100644 --- a/app/src/main/java/org/linphone/notifications/NotificationsManager.kt +++ b/app/src/main/java/org/linphone/notifications/NotificationsManager.kt @@ -132,7 +132,7 @@ class NotificationsManager(private val context: Context) { } override fun onMessageReceived(core: Core, room: ChatRoom, message: ChatMessage) { - if (message.isOutgoing) return + if (message.isOutgoing || corePreferences.disableChat) return if (currentlyDisplayedChatRoomAddress == room.peerAddress.asStringUriOnly()) { Log.i("[Notifications Manager] Chat room is currently displayed, do not notify received message") diff --git a/app/src/main/java/org/linphone/utils/DataBindingUtils.kt b/app/src/main/java/org/linphone/utils/DataBindingUtils.kt index a09d9b3a8..cb3e5104d 100644 --- a/app/src/main/java/org/linphone/utils/DataBindingUtils.kt +++ b/app/src/main/java/org/linphone/utils/DataBindingUtils.kt @@ -32,6 +32,8 @@ import android.view.ViewGroup import android.view.inputmethod.EditorInfo import android.widget.* import android.widget.SeekBar.OnSeekBarChangeListener +import androidx.constraintlayout.widget.ConstraintLayout +import androidx.constraintlayout.widget.Guideline import androidx.databinding.* import com.bumptech.glide.load.DataSource import com.bumptech.glide.load.engine.GlideException @@ -135,6 +137,13 @@ fun setLayoutToLeftOf(view: View, oldTargetId: Int, newTargetId: Int) { view.layoutParams = layoutParams } +@BindingAdapter("layout_constraintGuide_percent") +fun setLayoutConstraintGuidePercent(guideline: Guideline, percent: Float) { + val params = guideline.layoutParams as ConstraintLayout.LayoutParams + params.guidePercent = percent + guideline.layoutParams = params +} + @BindingAdapter("onClickToggleSwitch") fun switchSetting(view: View, switchId: Int) { val switch: SwitchMaterial = view.findViewById(switchId) @@ -162,9 +171,9 @@ fun editTextSetting(view: EditText, lambda: () -> Unit) { } } - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} - override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { } + override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {} }) } @@ -195,9 +204,9 @@ fun setListener(view: SeekBar, lambda: (Any) -> Unit) { if (fromUser) lambda(progress) } - override fun onStartTrackingTouch(seekBar: SeekBar?) { } + override fun onStartTrackingTouch(seekBar: SeekBar?) {} - override fun onStopTrackingTouch(seekBar: SeekBar?) { } + override fun onStopTrackingTouch(seekBar: SeekBar?) {} }) } @@ -226,7 +235,12 @@ private fun setEntries( val inflater = viewGroup.context.getSystemService(Context.LAYOUT_INFLATER_SERVICE) as LayoutInflater for (i in entries.indices) { val entry = entries[i] - val binding = DataBindingUtil.inflate(inflater, layoutId, viewGroup, false) + val binding = DataBindingUtil.inflate( + inflater, + layoutId, + viewGroup, + false + ) binding.setVariable(BR.data, entry) binding.setVariable(BR.longClickListener, onLongClick) binding.setVariable(BR.parent, parent) @@ -271,7 +285,9 @@ fun setEntries( @BindingAdapter("glideAvatarFallback") fun loadAvatarWithGlideFallback(imageView: ImageView, path: String?) { if (path != null && path.isNotEmpty() && FileUtils.isExtensionImage(path)) { - GlideApp.with(imageView).load(path).apply(RequestOptions.circleCropTransform()).into(imageView) + GlideApp.with(imageView).load(path).apply(RequestOptions.circleCropTransform()).into( + imageView + ) } else { Log.w("[Data Binding] [Glide] Can't load $path") imageView.setImageResource(R.drawable.avatar) @@ -295,30 +311,31 @@ fun loadAvatarWithGlide(imageView: ImageView, path: Uri?) { @BindingAdapter("glideAvatar") fun loadAvatarWithGlide(imageView: ImageView, path: String?) { if (path != null) { - GlideApp.with(imageView).load(path).apply(RequestOptions.circleCropTransform()).listener(object : - RequestListener { - override fun onLoadFailed( - e: GlideException?, - model: Any?, - target: Target?, - isFirstResource: Boolean - ): Boolean { - Log.w("[Data Binding] [Glide] Can't load $path") - imageView.visibility = View.GONE - return false - } + GlideApp.with(imageView).load(path).apply(RequestOptions.circleCropTransform()).listener( + object : + RequestListener { + override fun onLoadFailed( + e: GlideException?, + model: Any?, + target: Target?, + isFirstResource: Boolean + ): Boolean { + Log.w("[Data Binding] [Glide] Can't load $path") + imageView.visibility = View.GONE + return false + } - override fun onResourceReady( - resource: Drawable?, - model: Any?, - target: Target?, - dataSource: DataSource?, - isFirstResource: Boolean - ): Boolean { - imageView.visibility = View.VISIBLE - return false - } - }).into(imageView) + override fun onResourceReady( + resource: Drawable?, + model: Any?, + target: Target?, + dataSource: DataSource?, + isFirstResource: Boolean + ): Boolean { + imageView.visibility = View.VISIBLE + return false + } + }).into(imageView) } else { imageView.visibility = View.GONE } @@ -341,13 +358,14 @@ fun addPhoneNumberEditTextValidation(editText: EditText, enabled: Boolean) { override fun afterTextChanged(s: Editable?) { when { s?.matches(Regex("\\d+")) == false -> - editText.error = editText.context.getString(R.string.assistant_error_phone_number_invalid_characters) + editText.error = + editText.context.getString(R.string.assistant_error_phone_number_invalid_characters) } } - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} - override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { } + override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {} }) } @@ -355,9 +373,9 @@ fun addPhoneNumberEditTextValidation(editText: EditText, enabled: Boolean) { fun addPrefixEditTextValidation(editText: EditText, enabled: Boolean) { if (!enabled) return editText.addTextChangedListener(object : TextWatcher { - override fun afterTextChanged(s: Editable?) { } + override fun afterTextChanged(s: Editable?) {} - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { if (s == null || s.isEmpty() || !s.startsWith("+")) { @@ -370,22 +388,28 @@ fun addPrefixEditTextValidation(editText: EditText, enabled: Boolean) { @BindingAdapter("assistantUsernameValidation") fun addUsernameEditTextValidation(editText: EditText, enabled: Boolean) { if (!enabled) return - val usernameRegexp = corePreferences.config.getString("assistant", "username_regex", "^[a-z0-9+_.\\-]*\$")!! + val usernameRegexp = corePreferences.config.getString( + "assistant", + "username_regex", + "^[a-z0-9+_.\\-]*\$" + )!! val usernameMaxLength = corePreferences.config.getInt("assistant", "username_max_length", 64) editText.addTextChangedListener(object : TextWatcher { override fun afterTextChanged(s: Editable?) { when { s?.matches(Regex(usernameRegexp)) == false -> - editText.error = editText.context.getString(R.string.assistant_error_username_invalid_characters) + editText.error = + editText.context.getString(R.string.assistant_error_username_invalid_characters) s?.length ?: 0 > usernameMaxLength -> { - editText.error = editText.context.getString(R.string.assistant_error_username_too_long) + editText.error = + editText.context.getString(R.string.assistant_error_username_too_long) } } } - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} - override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { } + override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {} }) } @@ -393,13 +417,14 @@ fun addUsernameEditTextValidation(editText: EditText, enabled: Boolean) { fun addEmailEditTextValidation(editText: EditText, enabled: Boolean) { if (!enabled) return editText.addTextChangedListener(object : TextWatcher { - override fun afterTextChanged(s: Editable?) { } + override fun afterTextChanged(s: Editable?) {} - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { if (!Patterns.EMAIL_ADDRESS.matcher(s).matches()) { - editText.error = editText.context.getString(R.string.assistant_error_invalid_email_address) + editText.error = + editText.context.getString(R.string.assistant_error_invalid_email_address) } } }) @@ -409,13 +434,14 @@ fun addEmailEditTextValidation(editText: EditText, enabled: Boolean) { fun addUrlEditTextValidation(editText: EditText, enabled: Boolean) { if (!enabled) return editText.addTextChangedListener(object : TextWatcher { - override fun afterTextChanged(s: Editable?) { } + override fun afterTextChanged(s: Editable?) {} - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun onTextChanged(s: CharSequence, start: Int, before: Int, count: Int) { if (!Patterns.WEB_URL.matcher(s).matches()) { - editText.error = editText.context.getString(R.string.assistant_remote_provisioning_wrong_format) + editText.error = + editText.context.getString(R.string.assistant_remote_provisioning_wrong_format) } } }) @@ -426,11 +452,12 @@ fun addPasswordConfirmationEditTextValidation(password: EditText, passwordConfir password.addTextChangedListener(object : TextWatcher { override fun afterTextChanged(s: Editable?) {} - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { if (passwordConfirmation.text == null || s == null || passwordConfirmation.text.toString() != s.toString()) { - passwordConfirmation.error = passwordConfirmation.context.getString(R.string.assistant_error_passwords_dont_match) + passwordConfirmation.error = + passwordConfirmation.context.getString(R.string.assistant_error_passwords_dont_match) } else { passwordConfirmation.error = null // To clear other edit text field error } @@ -440,11 +467,12 @@ fun addPasswordConfirmationEditTextValidation(password: EditText, passwordConfir passwordConfirmation.addTextChangedListener(object : TextWatcher { override fun afterTextChanged(s: Editable?) {} - override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) { } + override fun beforeTextChanged(s: CharSequence?, start: Int, count: Int, after: Int) {} override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { if (password.text == null || s == null || password.text.toString() != s.toString()) { - passwordConfirmation.error = passwordConfirmation.context.getString(R.string.assistant_error_passwords_dont_match) + passwordConfirmation.error = + passwordConfirmation.context.getString(R.string.assistant_error_passwords_dont_match) } } }) @@ -474,7 +502,7 @@ fun setEditTextErrorListener(editText: EditText, attrChange: InverseBindingListe attrChange.onChange() } - override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) { } + override fun onTextChanged(s: CharSequence?, start: Int, before: Int, count: Int) {} }) } diff --git a/app/src/main/res/layout-land/history_detail_fragment.xml b/app/src/main/res/layout-land/history_detail_fragment.xml index bb685a632..5c250119a 100644 --- a/app/src/main/res/layout-land/history_detail_fragment.xml +++ b/app/src/main/res/layout-land/history_detail_fragment.xml @@ -124,6 +124,7 @@ diff --git a/app/src/main/res/layout-land/tabs_fragment.xml b/app/src/main/res/layout-land/tabs_fragment.xml index 4c94c23af..dbc12d596 100644 --- a/app/src/main/res/layout-land/tabs_fragment.xml +++ b/app/src/main/res/layout-land/tabs_fragment.xml @@ -33,21 +33,21 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="horizontal" - app:layout_constraintGuide_percent="0.25" /> + layout_constraintGuide_percent="@{viewModel.leftAnchor, default=0.25}" /> + layout_constraintGuide_percent="@{viewModel.middleAnchor, default=0.5}" /> + layout_constraintGuide_percent="@{viewModel.rightAnchor, default=0.75}" /> + android:background="?attr/accentColor" /> diff --git a/app/src/main/res/layout-sw533dp-land/history_detail_fragment.xml b/app/src/main/res/layout-sw533dp-land/history_detail_fragment.xml index f4faa6e29..002954d30 100644 --- a/app/src/main/res/layout-sw533dp-land/history_detail_fragment.xml +++ b/app/src/main/res/layout-sw533dp-land/history_detail_fragment.xml @@ -118,6 +118,7 @@ diff --git a/app/src/main/res/layout/call_primary_buttons.xml b/app/src/main/res/layout/call_primary_buttons.xml index e02ac87b7..d767e4437 100644 --- a/app/src/main/res/layout/call_primary_buttons.xml +++ b/app/src/main/res/layout/call_primary_buttons.xml @@ -8,94 +8,65 @@ type="org.linphone.activities.call.viewmodels.ControlsViewModel" /> - + android:layout_height="60dp" + android:orientation="horizontal"> - + android:layout_height="wrap_content" + android:layout_weight="0.25" + android:background="@drawable/button_background_dark" + android:padding="15dp" + android:src="@drawable/call_numpad" /> - - + android:onClick="@{() -> viewModel.onChatClicked()}" + android:visibility="@{viewModel.chatAllowed ? View.VISIBLE : View.GONE}" + android:layout_width="0dp" + android:layout_height="wrap_content" + android:layout_weight="0.25" + android:background="@drawable/footer_button"> + android:src="@drawable/footer_chat" /> - - - - - - - - - - - - - + android:layout_alignParentRight="true" + android:layout_alignParentTop="true" + android:layout_marginRight="25dp" + android:layout_marginTop="5dp" + android:background="@drawable/unread_message_count_bg" + android:gravity="center" /> - + \ No newline at end of file diff --git a/app/src/main/res/layout/contact_detail_cell.xml b/app/src/main/res/layout/contact_detail_cell.xml index df7de486d..e4e649cc2 100644 --- a/app/src/main/res/layout/contact_detail_cell.xml +++ b/app/src/main/res/layout/contact_detail_cell.xml @@ -91,6 +91,7 @@ diff --git a/app/src/main/res/layout/history_detail_fragment.xml b/app/src/main/res/layout/history_detail_fragment.xml index f4faa6e29..002954d30 100644 --- a/app/src/main/res/layout/history_detail_fragment.xml +++ b/app/src/main/res/layout/history_detail_fragment.xml @@ -118,6 +118,7 @@ diff --git a/app/src/main/res/layout/tabs_fragment.xml b/app/src/main/res/layout/tabs_fragment.xml index c650724eb..acc6341cb 100644 --- a/app/src/main/res/layout/tabs_fragment.xml +++ b/app/src/main/res/layout/tabs_fragment.xml @@ -33,21 +33,21 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" - app:layout_constraintGuide_percent="0.25" /> + layout_constraintGuide_percent="@{viewModel.leftAnchor, default=0.25}" /> + layout_constraintGuide_percent="@{viewModel.middleAnchor, default=0.5}" /> + layout_constraintGuide_percent="@{viewModel.rightAnchor, default=0.75}" /> + android:background="?attr/accentColor" /> diff --git a/app/src/main/res/xml/motion_main_activity_tabs_selector.xml b/app/src/main/res/xml/motion_main_activity_tabs_selector.xml index 06593e7d5..c782307de 100644 --- a/app/src/main/res/xml/motion_main_activity_tabs_selector.xml +++ b/app/src/main/res/xml/motion_main_activity_tabs_selector.xml @@ -31,9 +31,9 @@ + motion:layout_constraintLeft_toLeftOf="parent" + motion:layout_constraintRight_toLeftOf="@id/guidelineLeft" /> @@ -42,9 +42,9 @@ + motion:layout_constraintLeft_toLeftOf="@id/guidelineLeft" + motion:layout_constraintRight_toLeftOf="@id/guidelineMiddle" /> @@ -53,9 +53,9 @@ + motion:layout_constraintLeft_toLeftOf="@id/guidelineMiddle" + motion:layout_constraintRight_toLeftOf="@id/guidelineRight" /> @@ -64,8 +64,8 @@ diff --git a/app/src/main/res/xml/motion_main_activity_tabs_selector_land.xml b/app/src/main/res/xml/motion_main_activity_tabs_selector_land.xml index d9c7591df..8f587ab09 100644 --- a/app/src/main/res/xml/motion_main_activity_tabs_selector_land.xml +++ b/app/src/main/res/xml/motion_main_activity_tabs_selector_land.xml @@ -31,9 +31,9 @@ + motion:layout_constraintTop_toTopOf="parent" + motion:layout_constraintBottom_toBottomOf="@id/guidelineTop" /> @@ -42,9 +42,9 @@ + motion:layout_constraintTop_toTopOf="@id/guidelineTop" + motion:layout_constraintBottom_toBottomOf="@id/guidelineMiddle" /> @@ -53,9 +53,9 @@ + motion:layout_constraintTop_toTopOf="@id/guidelineMiddle" + motion:layout_constraintBottom_toBottomOf="@id/guidelineBottom" /> @@ -64,8 +64,8 @@