Auxio/app/src/main/res/layout/fragment_home.xml
OxygenCobalt c5b1d7d735
ui: refactor edge-to-edge
Merge all edge-to-edge functions into two methods for applying insets.
This generally simplifies code.
2021-08-29 16:20:45 -06:00

57 lines
No EOL
2.5 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:animateLayoutChanges="true"
android:orientation="vertical">
<com.google.android.material.appbar.AppBarLayout
android:id="@+id/home_appbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/colorSurface"
android:clickable="true"
android:elevation="@dimen/elevation_normal"
android:focusable="true">
<androidx.appcompat.widget.Toolbar
android:id="@+id/home_toolbar"
style="@style/Widget.Toolbar"
android:elevation="0dp"
android:fitsSystemWindows="true"
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:clickable="true"
android:focusable="true"
app:tabContentStart="@dimen/spacing_medium"
app:tabIndicatorColor="?attr/colorAccent"
app:tabMode="scrollable"
app:tabRippleColor="?attr/colorControlHighlight"
app:tabTextAppearance="@style/TextAppearance.TabLayout.Label"
app:tabTextColor="?android:attr/textColorPrimary"
app:tabUnboundedRipple="true" />
</com.google.android.material.appbar.AppBarLayout>
<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" />
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</layout>