Auxio/app/src/main/res/layout/fragment_home.xml
OxygenCobalt acabe9217b
ui: use colorOnSurface
Use colorOnSurface for the first time ever. I decided to pick a color
that was as non-intrusive as possible that was still differentiateable,
and I think it looks like a net improvement. It will probably be
tweaked a bit in the future as I expand it to other elevated views.
2021-08-30 20:19:52 -06:00

54 lines
No EOL
2.4 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:clipChildren="true"
android:elevation="@dimen/elevation_normal"
android:focusable="true">
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/home_toolbar"
style="@style/Widget.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"
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>