I would like to add some transitioning text to the collapsed version of the collapsed toolbar I have a collapsed toolbar with a tablayout and a textview with text underneath the tablayout. Both of which are in collapsing toolbar.
How could I get the text from the TextView to transition into the space of the collapsed toolbar
I have searched online but none of them are solutions to my problem
This is my layout
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:card_view="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".AddExpenseSheetActivity">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/expense_bar_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<androidx.appcompat.widget.Toolbar
android:id="@+id/expense_toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
android:background="?attr/colorPrimary"
app:layout_scrollFlags="scroll|exitUntilCollapsed"
app:popupTheme="@style/AppTheme.PopupOverlay">
<TextView
android:id="@+id/expense_bar_title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginRight="?android:attr/actionBarSize"
android:gravity="center"
android:text="@string/placeholder_text"
android:textColor="@android:color/white"
android:textSize="20sp" />
</androidx.appcompat.widget.Toolbar>
</com.google.android.material.appbar.AppBarLayout>
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/expense_bar_container">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/tab_layout_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="12dp"
android:fitsSystemWindows="true"
android:theme="@style/AppTheme.AppBarOverlay">
<com.google.android.material.appbar.CollapsingToolbarLayout
android:id="@+id/tab_collapsing_toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
android:minHeight="40dp"
app:contentScrim="?attr/colorPrimary"
app:expandedTitleGravity="bottom|center_horizontal"
app:layout_scrollFlags="scroll|exitUntilCollapsed">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<com.google.android.material.tabs.TabLayout
android:id="@+id/expense_account_tab"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorPrimaryDark"
android:elevation="12dp"
android:minHeight="?attr/actionBarSize"
android:theme="@style/ThemeOverlay.AppCompat.Dark.ActionBar"
app:tabIndicatorColor="@android:color/white"
app:tabIndicatorGravity="top"
app:tabIndicatorHeight="10dp"
app:tabMode="scrollable" />
<androidx.cardview.widget.CardView
android:id="@+id/expense_amount_cardView"
android:layout_width="match_parent"
android:layout_height="150dp"
android:layout_below="@id/expense_account_tab"
android:layout_gravity="center"
android:elevation="10dp"
card_view:cardBackgroundColor="?attr/colorPrimaryDark"
card_view:cardCornerRadius="5dp"
card_view:cardElevation="10dp"
card_view:cardUseCompatPadding="false">
<TextView
android:id="@+id/expense_text_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center"
android:contentDescription="@string/expense_text_desc"
android:gravity="center"
android:text="$00000.00"
android:textAlignment="center"
android:textColor="@android:color/white"
android:textSize="75sp" />
</androidx.cardview.widget.CardView>
</RelativeLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>
</com.google.android.material.appbar.AppBarLayout>
<include layout="@layout/content_add_expense" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</RelativeLayout>
I want the $0000.00 to transition into the space below the toolbar. How do I do this?