Reworked tab layout to fix scrolling glitch
This commit is contained in:
parent
e059039d57
commit
79bad283e2
12 changed files with 377 additions and 543 deletions
|
@ -19,7 +19,9 @@
|
|||
*/
|
||||
package org.linphone.activities.main.fragments
|
||||
|
||||
import android.animation.ValueAnimator
|
||||
import android.os.Bundle
|
||||
import android.view.animation.LinearInterpolator
|
||||
import androidx.lifecycle.ViewModelProvider
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.NavDestination
|
||||
|
@ -34,6 +36,10 @@ class TabsFragment : GenericFragment<TabsFragmentBinding>(), NavController.OnDes
|
|||
|
||||
override fun getLayoutId(): Int = R.layout.tabs_fragment
|
||||
|
||||
private val bounceAnimator: ValueAnimator by lazy {
|
||||
ValueAnimator.ofFloat(resources.getDimension(R.dimen.tabs_fragment_unread_count_bounce_offset), 0f)
|
||||
}
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
|
||||
|
@ -75,14 +81,26 @@ class TabsFragment : GenericFragment<TabsFragmentBinding>(), NavController.OnDes
|
|||
R.id.dialerFragment -> findNavController().navigate(R.id.action_dialerFragment_to_masterChatRoomsFragment)
|
||||
}
|
||||
}
|
||||
|
||||
bounceAnimator.addUpdateListener {
|
||||
val value = it.animatedValue as Float
|
||||
binding.historyUnreadCount.translationY = -value
|
||||
binding.chatUnreadCount.translationY = -value
|
||||
}
|
||||
bounceAnimator.interpolator = LinearInterpolator()
|
||||
bounceAnimator.duration = 250
|
||||
bounceAnimator.repeatMode = ValueAnimator.REVERSE
|
||||
bounceAnimator.repeatCount = ValueAnimator.INFINITE
|
||||
}
|
||||
|
||||
override fun onStart() {
|
||||
super.onStart()
|
||||
bounceAnimator.start()
|
||||
findNavController().addOnDestinationChangedListener(this)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
bounceAnimator.pause()
|
||||
findNavController().removeOnDestinationChangedListener(this)
|
||||
super.onStop()
|
||||
}
|
||||
|
@ -93,10 +111,10 @@ class TabsFragment : GenericFragment<TabsFragmentBinding>(), NavController.OnDes
|
|||
arguments: Bundle?
|
||||
) {
|
||||
when (destination.id) {
|
||||
R.id.masterCallLogsFragment -> binding.selectorMotion.transitionToState(R.id.call_history)
|
||||
R.id.masterContactsFragment -> binding.selectorMotion.transitionToState(R.id.contacts)
|
||||
R.id.dialerFragment -> binding.selectorMotion.transitionToState(R.id.dialer)
|
||||
R.id.masterChatRoomsFragment -> binding.selectorMotion.transitionToState(R.id.chat_rooms)
|
||||
R.id.masterCallLogsFragment -> binding.motionLayout.transitionToState(R.id.call_history)
|
||||
R.id.masterContactsFragment -> binding.motionLayout.transitionToState(R.id.contacts)
|
||||
R.id.dialerFragment -> binding.motionLayout.transitionToState(R.id.dialer)
|
||||
R.id.masterChatRoomsFragment -> binding.motionLayout.transitionToState(R.id.chat_rooms)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
<layout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<data>
|
||||
|
@ -21,13 +22,11 @@
|
|||
type="org.linphone.activities.main.viewmodels.TabsViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:id="@+id/footer"
|
||||
android:layout_width="60dp"
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
android:id="@+id/motion_layout"
|
||||
android:layout_width="@dimen/main_activity_tabs_fragment_size"
|
||||
android:layout_height="match_parent"
|
||||
android:baselineAligned="false"
|
||||
android:orientation="vertical">
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_land">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guidelineTop"
|
||||
|
@ -50,37 +49,35 @@
|
|||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.75" />
|
||||
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
<ImageView
|
||||
android:id="@+id/history"
|
||||
android:onClick="@{historyClickListener}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/content_description_menu_history"
|
||||
android:padding="15dp"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{historyClickListener}"
|
||||
android:src="@drawable/footer_history"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineTop"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_history_unread_count_land">
|
||||
app:layout_constraintBottom_toTopOf="@id/guidelineTop" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/content_description_menu_history"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/footer_history" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/history_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.missedCallsCount)}"
|
||||
android:visibility="@{viewModel.missedCallsCount == 0 ? View.GONE : View.VISIBLE}" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
<TextView
|
||||
android:id="@+id/history_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.missedCallsCount)}"
|
||||
android:visibility="@{viewModel.missedCallsCount == 0 ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/footer_button"
|
||||
|
@ -99,6 +96,7 @@
|
|||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:background="@drawable/footer_button"
|
||||
|
@ -116,65 +114,42 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
<ImageView
|
||||
android:id="@+id/chat"
|
||||
android:onClick="@{chatClickListener}"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/content_description_menu_chat"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/footer_chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{chatClickListener}"
|
||||
app:layout_constraintTop_toTopOf="@id/guidelineBottom"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_chat_unread_count_land">
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/content_description_menu_chat"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/footer_chat" />
|
||||
<TextView
|
||||
android:id="@+id/chat_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="5dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.unreadMessagesCount)}"
|
||||
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@id/guidelineBottom" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chat_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.unreadMessagesCount)}"
|
||||
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE}" />
|
||||
<View
|
||||
android:id="@+id/selector"
|
||||
android:layout_width="@dimen/tabs_fragment_selector_size"
|
||||
android:layout_height="0dp"
|
||||
android:background="?attr/accentColor"
|
||||
app:layout_constraintHeight_percent=".25"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="@id/guidelineBottom" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
android:id="@+id/selectorMotion"
|
||||
android:layout_width="5dp"
|
||||
android:layout_height="match_parent"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_selector_land"
|
||||
app:layout_constraintLeft_toLeftOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gTop"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.25" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gMiddle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<View
|
||||
android:id="@+id/selector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/accentColor" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
</layout>
|
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<layout xmlns:tools="http://schemas.android.com/tools"
|
||||
<layout
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
|
@ -22,10 +22,11 @@
|
|||
type="org.linphone.activities.main.viewmodels.TabsViewModel" />
|
||||
</data>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/footer"
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
android:id="@+id/motion_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="60dp">
|
||||
android:layout_height="@dimen/main_activity_tabs_fragment_size"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guidelineLeft"
|
||||
|
@ -48,38 +49,35 @@
|
|||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.75" />
|
||||
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
<ImageView
|
||||
android:id="@+id/history"
|
||||
android:onClick="@{historyClickListener}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="15dp"
|
||||
android:contentDescription="@string/content_description_menu_history"
|
||||
android:src="@drawable/footer_history"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{historyClickListener}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineLeft"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_history_unread_count">
|
||||
app:layout_constraintEnd_toEndOf="@id/guidelineLeft" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/history"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:padding="15dp"
|
||||
android:contentDescription="@string/content_description_menu_history"
|
||||
android:src="@drawable/footer_history" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/history_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.missedCallsCount)}"
|
||||
android:visibility="@{viewModel.missedCallsCount == 0 ? View.GONE : View.VISIBLE}" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
<TextView
|
||||
android:id="@+id/history_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.missedCallsCount)}"
|
||||
android:visibility="@{viewModel.missedCallsCount == 0 ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintRight_toLeftOf="@id/guidelineLeft"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/contacts"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/footer_button"
|
||||
|
@ -98,6 +96,7 @@
|
|||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout
|
||||
android:id="@+id/dialer"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/footer_button"
|
||||
|
@ -115,66 +114,42 @@
|
|||
|
||||
</RelativeLayout>
|
||||
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
<ImageView
|
||||
android:id="@+id/chat"
|
||||
android:onClick="@{chatClickListener}"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/content_description_menu_chat"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/footer_chat"
|
||||
android:background="@drawable/footer_button"
|
||||
android:onClick="@{chatClickListener}"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_chat_unread_count"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="@id/guidelineRight">
|
||||
app:layout_constraintStart_toStartOf="@id/guidelineRight" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/chat"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_centerInParent="true"
|
||||
android:contentDescription="@string/content_description_menu_chat"
|
||||
android:padding="15dp"
|
||||
android:src="@drawable/footer_chat" />
|
||||
<TextView
|
||||
android:id="@+id/chat_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginRight="25dp"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.unreadMessagesCount)}"
|
||||
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE}"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/chat_unread_count"
|
||||
style="@style/unread_count_font"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="5dp"
|
||||
android:background="@drawable/unread_message_count_bg"
|
||||
android:gravity="center"
|
||||
android:text="@{String.valueOf(viewModel.unreadMessagesCount)}"
|
||||
android:visibility="@{viewModel.unreadMessagesCount == 0 ? View.GONE : View.VISIBLE}" />
|
||||
<View
|
||||
android:id="@+id/selector"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="@dimen/tabs_fragment_selector_size"
|
||||
android:background="?attr/accentColor"
|
||||
app:layout_constraintWidth_percent=".25"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="@id/guidelineMiddle" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
<androidx.constraintlayout.motion.widget.MotionLayout
|
||||
android:id="@+id/selectorMotion"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="5dp"
|
||||
app:layoutDescription="@xml/motion_main_activity_tabs_selector"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gLeft"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.25" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/gMiddle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_percent="0.5" />
|
||||
|
||||
<View
|
||||
android:id="@+id/selector"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/accentColor" />
|
||||
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.motion.widget.MotionLayout>
|
||||
|
||||
</layout>
|
|
@ -9,4 +9,6 @@
|
|||
<dimen name="video_preview_pip_max_size">50dp</dimen>
|
||||
<dimen name="main_activity_tabs_fragment_size">60dp</dimen>
|
||||
<dimen name="status_fragment_size">40dp</dimen>
|
||||
<dimen name="tabs_fragment_selector_size">5dp</dimen>
|
||||
<dimen name="tabs_fragment_unread_count_bounce_offset">5dp</dimen>
|
||||
</resources>
|
|
@ -7,6 +7,30 @@
|
|||
motion:constraintSetStart="@+id/visible"
|
||||
motion:constraintSetEnd="@+id/gone" />
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/dialer"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/contacts"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<ConstraintSet android:id="@+id/visible">
|
||||
|
||||
<Constraint
|
||||
|
@ -15,6 +39,16 @@
|
|||
android:layout_height="@dimen/main_activity_tabs_fragment_size"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/gone">
|
||||
|
@ -27,4 +61,88 @@
|
|||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/call_history">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"
|
||||
motion:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/contacts">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"
|
||||
motion:layout_constraintLeft_toLeftOf="@id/guidelineLeft" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/dialer">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"
|
||||
motion:layout_constraintLeft_toLeftOf="@id/guidelineMiddle" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/chat_rooms">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintBottom_toBottomOf="parent"
|
||||
motion:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
||||
|
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/bottom"
|
||||
motion:constraintSetEnd="@+id/top" />
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/top"
|
||||
motion:constraintSetEnd="@+id/bottom" />
|
||||
|
||||
<ConstraintSet android:id="@+id/bottom">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count"
|
||||
android:layout_marginRight="25dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="0dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/top">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count"
|
||||
android:layout_marginRight="25dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="5dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/bottom"
|
||||
motion:constraintSetEnd="@+id/top" />
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/top"
|
||||
motion:constraintSetEnd="@+id/bottom" />
|
||||
|
||||
<ConstraintSet android:id="@+id/bottom">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count"
|
||||
android:layout_marginRight="5dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="0dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/top">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count"
|
||||
android:layout_marginRight="5dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="5dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/bottom"
|
||||
motion:constraintSetEnd="@+id/top" />
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/top"
|
||||
motion:constraintSetEnd="@+id/bottom" />
|
||||
|
||||
<ConstraintSet android:id="@+id/bottom">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count"
|
||||
android:layout_marginRight="25dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="0dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/top">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count"
|
||||
android:layout_marginRight="25dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="5dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
|
@ -1,59 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/bottom"
|
||||
motion:constraintSetEnd="@+id/top" />
|
||||
|
||||
<Transition
|
||||
motion:duration="250"
|
||||
motion:autoTransition="animateToEnd"
|
||||
motion:constraintSetStart="@+id/top"
|
||||
motion:constraintSetEnd="@+id/bottom" />
|
||||
|
||||
<ConstraintSet android:id="@+id/bottom">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count"
|
||||
android:layout_marginRight="5dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="0dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/top">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count"
|
||||
android:layout_marginRight="5dp"
|
||||
motion:layout_constraintRight_toRightOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content">
|
||||
|
||||
<CustomAttribute
|
||||
motion:attributeName="translationY"
|
||||
motion:customDimension="5dp"/>
|
||||
|
||||
<PropertySet
|
||||
motion:visibilityMode="ignore" />
|
||||
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
|
@ -7,6 +7,30 @@
|
|||
motion:constraintSetStart="@+id/visible"
|
||||
motion:constraintSetEnd="@+id/gone" />
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/dialer"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/contacts"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<ConstraintSet android:id="@+id/visible">
|
||||
|
||||
<Constraint
|
||||
|
@ -16,6 +40,16 @@
|
|||
motion:layout_constraintLeft_toLeftOf="parent"
|
||||
motion:layout_constraintRight_creator="0"/>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/gone">
|
||||
|
@ -28,4 +62,88 @@
|
|||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/call_history">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/contacts">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="@id/guidelineTop" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/dialer">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="parent"
|
||||
motion:layout_constraintTop_toTopOf="@id/guidelineMiddle" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/chat_rooms">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="@dimen/tabs_fragment_selector_size"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="parent"
|
||||
motion:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<Constraint
|
||||
android:id="@id/history_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
<Constraint
|
||||
android:id="@id/chat_unread_count">
|
||||
<PropertySet motion:visibilityMode="ignore" />
|
||||
</Constraint>
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
||||
|
|
|
@ -1,68 +0,0 @@
|
|||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/dialer"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/contacts"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<ConstraintSet android:id="@+id/call_history">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="wrap_content"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="parent" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/contacts">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="wrap_content"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="@id/gLeft" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/dialer">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="wrap_content"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintLeft_toLeftOf="@id/gMiddle" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/chat_rooms">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_height="wrap_content"
|
||||
motion:layout_constraintWidth_percent=".25"
|
||||
motion:layout_constraintRight_toRightOf="parent" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
|
@ -1,68 +0,0 @@
|
|||
<MotionScene xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:motion="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/dialer"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/contacts"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/call_history"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/dialer"/>
|
||||
|
||||
<Transition
|
||||
motion:constraintSetStart="@+id/contacts"
|
||||
motion:constraintSetEnd="@+id/chat_rooms"/>
|
||||
|
||||
<ConstraintSet android:id="@+id/call_history">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="wrap_content"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/contacts">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="wrap_content"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintTop_toTopOf="@id/gTop" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/dialer">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="wrap_content"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintTop_toTopOf="@id/gMiddle" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
<ConstraintSet android:id="@+id/chat_rooms">
|
||||
|
||||
<Constraint
|
||||
android:id="@id/selector"
|
||||
android:layout_width="wrap_content"
|
||||
motion:layout_constraintHeight_percent=".25"
|
||||
motion:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
</ConstraintSet>
|
||||
|
||||
</MotionScene>
|
Loading…
Reference in a new issue