Files
auxio-fork/app/src/main/res/layout/fragment_home.xml
T
OxygenCobalt 255154c411 home: remove fab scrolling behavior
Remove the ability for the FAB to disappear on scroll, mostly because
the state would not be consistent and it was generally bad UX when
combined with the fast scroller.
2021-10-25 16:38:37 -06:00

62 lines
2.7 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<layout 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"
tools:context=".home.HomeFragment">
<androidx.coordinatorlayout.widget.CoordinatorLayout
android:id="@+id/main_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<org.oxycblt.auxio.ui.LiftAppBarLayout
android:id="@+id/home_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:clickable="true"
android:clipChildren="true"
android:focusable="true"
app:liftOnScroll="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/home_toolbar"
style="@style/Widget.Auxio.Toolbar"
app:layout_scrollFlags="scroll|enterAlways"
app:menu="@menu/menu_home"
app:title="@string/info_app_name" />
<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:tabMode="scrollable"
app:tabTextAppearance="@style/TextAppearance.Auxio.TabLayout.Label"
app:tabTextColor="@color/sel_accented_primary"/>
</org.oxycblt.auxio.ui.LiftAppBarLayout>
<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" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/home_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/ic_shuffle"
android:layout_margin="@dimen/spacing_medium"
android:contentDescription="@string/desc_shuffle_all"
app:layout_anchor="@id/home_pager"
app:tint="?attr/colorControlNormal"
app:layout_anchorGravity="bottom|end" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>