Auxio/app/src/main/res/layout/fragment_home.xml
Alexander Capehart c353ffd705
home: expand appbar when selection starts
Expand the home AppBarLayout when a selection begins (Excluding
initialization)
2022-12-17 13:29:13 -07:00

138 lines
6.3 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/home_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?attr/colorSurface"
android:transitionGroup="true">
<org.oxycblt.auxio.ui.AuxioAppBarLayout
android:id="@+id/home_appbar"
style="@style/Widget.Auxio.AppBarLayout"
android:fitsSystemWindows="true">
<org.oxycblt.auxio.ui.selection.SelectionToolbarOverlay
android:id="@+id/home_toolbar_overlay"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/home_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_scrollFlags="scroll|enterAlways"
app:menu="@menu/menu_home"
app:title="@string/info_app_name" />
</org.oxycblt.auxio.ui.selection.SelectionToolbarOverlay>
<com.google.android.material.tabs.TabLayout
android:id="@+id/home_tabs"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
app:tabContentStart="@dimen/spacing_medium"
app:tabGravity="start"
app:tabMode="scrollable" />
</org.oxycblt.auxio.ui.AuxioAppBarLayout>
<FrameLayout
android:id="@+id/home_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:animateLayoutChanges="true"
android:clipToPadding="false"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<androidx.viewpager2.widget.ViewPager2
android:id="@+id/home_pager"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:layoutManager="androidx.recyclerview.widget.LinearLayoutManager"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"
tools:layout="@layout/fragment_home_list" />
<org.oxycblt.auxio.home.EdgeFrameLayout
android:id="@+id/home_indexing_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_margin="@dimen/spacing_medium"
android:fitsSystemWindows="true"
android:visibility="invisible">
<com.google.android.material.card.MaterialCardView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:animateLayoutChanges="true">
<TextView
android:id="@+id/home_indexing_status"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_medium"
android:gravity="center"
android:textAppearance="@style/TextAppearance.Auxio.BodyLarge"
app:layout_constraintBottom_toTopOf="@+id/home_indexing_action"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Status" />
<com.google.android.material.progressindicator.LinearProgressIndicator
android:id="@+id/home_indexing_progress"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:indeterminate="true"
app:indeterminateAnimationType="disjoint"
app:layout_constraintBottom_toBottomOf="@+id/home_indexing_action"
app:layout_constraintTop_toTopOf="@+id/home_indexing_action" />
<Button
android:id="@+id/home_indexing_action"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/spacing_medium"
android:layout_marginEnd="@dimen/spacing_medium"
android:layout_marginBottom="@dimen/spacing_medium"
android:text="@string/lbl_retry"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toBottomOf="@+id/home_indexing_status" />
</androidx.constraintlayout.widget.ConstraintLayout>
</com.google.android.material.card.MaterialCardView>
</org.oxycblt.auxio.home.EdgeFrameLayout>
</FrameLayout>
<org.oxycblt.auxio.home.EdgeFrameLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_anchor="@id/home_content"
app:layout_anchorGravity="bottom|end">
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/home_fab"
style="@style/Widget.Auxio.FloatingActionButton.Adaptive"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/spacing_medium"
android:contentDescription="@string/desc_shuffle_all"
android:src="@drawable/ic_shuffle_off_24" />
</org.oxycblt.auxio.home.EdgeFrameLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>