home: make tabs adaptive
Make tabs on the home page adapt to screen configuration changes, using only icons when the width is small and icons + text when the width is large.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="?attr/colorPrimary">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M12,3v10.55c-0.59,-0.34 -1.27,-0.55 -2,-0.55 -2.21,0 -4,1.79 -4,4s1.79,4 4,4 4,-1.79 4,-4V7h4V3h-6z"/>
|
||||
</vector>
|
||||
@@ -7,17 +7,13 @@
|
||||
<org.oxycblt.auxio.ui.EdgeCoordinatorLayout
|
||||
android:id="@+id/main_layout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical">
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<org.oxycblt.auxio.ui.EdgeAppBarLayout
|
||||
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
|
||||
@@ -34,8 +30,7 @@
|
||||
app:tabContentStart="@dimen/spacing_medium"
|
||||
app:tabGravity="start"
|
||||
app:tabMode="scrollable"
|
||||
app:tabTextAppearance="@style/TextAppearance.Auxio.LabelLarger"
|
||||
app:tabTextColor="@color/sel_accented_primary" />
|
||||
app:tabTextAppearance="@style/TextAppearance.Auxio.LabelLarger" />
|
||||
|
||||
</org.oxycblt.auxio.ui.EdgeAppBarLayout>
|
||||
|
||||
@@ -61,7 +56,6 @@
|
||||
android:layout_margin="@dimen/spacing_medium"
|
||||
android:contentDescription="@string/desc_shuffle_all"
|
||||
android:src="@drawable/ic_shuffle"
|
||||
app:fabSize="normal"
|
||||
app:tint="?attr/colorOnPrimaryContainer" />
|
||||
|
||||
</org.oxycblt.auxio.home.FloatingActionButtonContainer>
|
||||
|
||||
Reference in New Issue
Block a user