Fix folder search, home toolbar

This commit is contained in:
h4h13 2019-09-29 09:03:23 +05:30
parent 3a7d3bfcfe
commit 69cce5eb7e
17 changed files with 64 additions and 51 deletions

View file

@ -81,6 +81,7 @@ class OptionsSheetDialogFragment : DialogFragment(), View.OnClickListener {
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
dialog?.window?.let {
(requireActivity() as MainActivity).setNavigationBarColorPrimary()
(requireActivity() as MainActivity).setLightNavigationBar(true)
}

View file

@ -152,7 +152,7 @@ public class FoldersFragment extends AbsMainActivityFragment implements
private void initViews(View view) {
coordinatorLayout = view.findViewById(R.id.coordinatorLayout);
toolbarContainer = view.findViewById(R.id.toolbarContainer);
recyclerView = view.findViewById(R.id.recyclerView);
appBarLayout = view.findViewById(R.id.appBarLayout);
breadCrumbs = view.findViewById(R.id.breadCrumbs);

View file

@ -81,6 +81,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="6dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways">
<com.google.android.material.appbar.MaterialToolbar

View file

@ -15,7 +15,7 @@
<include layout="@layout/status_bar" />
<code.name.monkey.appthemehelper.common.views.ATEToolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:background="@android:color/transparent"
@ -82,7 +82,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="-8dp"
app:cardBackgroundColor="?cardBackgroundColor"
app:cardBackgroundColor="?colorSurface"
app:cardElevation="@dimen/card_elevation"
app:cardUseCompatPadding="false"
sothree:cardCornerRadius="12dp">
@ -106,7 +106,7 @@
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/playerQueueSubHeader"
android:layout_width="match_parent"
android:layout_height="48dp"

View file

@ -35,9 +35,7 @@
<com.google.android.material.appbar.AppBarLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
@ -50,6 +48,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor"
app:strokeWidth="1dp">
@ -73,8 +72,6 @@
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginStart="@dimen/horizontal_margin"
android:layout_marginEnd="@dimen/horizontal_margin"
app:layout_behavior="@string/appbar_scrolling_view_behavior">
<include layout="@layout/home_content" />

View file

@ -82,6 +82,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="6dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways">
<code.name.monkey.appthemehelper.common.views.ATEToolbar
@ -95,7 +96,7 @@
app:title="@string/search_hint"
app:titleMarginStart="0dp"
app:titleTextAppearance="@style/ToolbarTextAppearanceSearch"
tools:ignore="UnusedAttribute"/>
tools:ignore="UnusedAttribute" />
</com.google.android.material.card.MaterialCardView>
</LinearLayout>
</com.google.android.material.appbar.CollapsingToolbarLayout>

View file

@ -37,8 +37,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
@ -51,6 +50,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor"
app:strokeWidth="1dp">

View file

@ -82,6 +82,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="6dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways">
<com.google.android.material.appbar.MaterialToolbar

View file

@ -38,8 +38,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
@ -51,6 +50,7 @@
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:layout_collapseMode="pin"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor"

View file

@ -11,16 +11,18 @@
android:id="@+id/appBarLayout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="0dp"
android:fitsSystemWindows="true"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/searchContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginTop="@dimen/toolbar_margin_vertical"
android:layout_marginEnd="@dimen/toolbar_margin_horizontal"
android:layout_marginBottom="@dimen/toolbar_margin_vertical"
app:cardBackgroundColor="?colorSurface"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
@ -33,12 +35,13 @@
android:layout_height="50dp"
android:gravity="center_vertical">
<code.name.monkey.retromusic.views.IconImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="14dp"
app:srcCompat="@drawable/ic_keyboard_backspace_black_24dp" />
app:srcCompat="@drawable/ic_keyboard_backspace_black_24dp"
app:tint="?colorOnSurface" />
<com.google.android.material.textfield.TextInputEditText
@ -55,23 +58,29 @@
<requestFocus />
</com.google.android.material.textfield.TextInputEditText>
<code.name.monkey.retromusic.views.IconImageView
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/voiceSearch"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0"
android:background="?roundSelector"
android:padding="14dp"
app:srcCompat="@drawable/ic_mic_white_24dp" />
app:srcCompat="@drawable/ic_mic_white_24dp"
app:tint="?colorOnSurface"
tools:visibility="visible" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout>
<FrameLayout
<androidx.core.widget.NestedScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<com.google.android.material.textview.MaterialTextView
android:id="@android:id/empty"
android:layout_width="match_parent"
@ -90,9 +99,9 @@
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical"
app:layout_behavior="@string/appbar_scrolling_view_behavior" />
android:scrollbars="vertical" />
</FrameLayout>
</androidx.core.widget.NestedScrollView>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/keyboardPopup"

View file

@ -77,6 +77,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor">

View file

@ -14,10 +14,10 @@
android:clickable="false"
android:focusable="true"
android:gravity="bottom"
sothree:umanoDragView="@id/playerPanel"
sothree:umanoFadeColor="#00000000"
sothree:umanoOverlay="true"
sothree:umanoPanelHeight="0dp"
sothree:umanoDragView="@id/playerPanel"
sothree:umanoScrollableView="@+id/playerRecyclerView"
sothree:umanoShadowHeight="0dp">
@ -76,7 +76,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/status_bar_padding" />
<code.name.monkey.appthemehelper.common.views.ATEToolbar
<com.google.android.material.appbar.MaterialToolbar
android:id="@+id/playerToolbar"
style="@style/Toolbar"
android:background="@android:color/transparent"
@ -127,7 +127,7 @@
android:id="@+id/currentSong"
layout="@layout/item_list" />
<TextView
<com.google.android.material.textview.MaterialTextView
android:id="@+id/playerQueueSubHeader"
android:layout_width="match_parent"
android:layout_height="48dp"

View file

@ -34,8 +34,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/transparent"
android:elevation="0dp"
app:elevation="0dp">
app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView
android:id="@+id/toolbarContainer"
@ -48,6 +47,7 @@
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
app:cardUseCompatPadding="true"
app:layout_collapseMode="pin"
app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor"
app:strokeWidth="1dp">

View file

@ -12,10 +12,10 @@
style="@style/Widget.MaterialComponents.Chip.Action"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="12dp"
android:layout_marginBottom="12dp"
android:layout_marginStart="@dimen/horizontal_padding_home"
android:layout_marginTop="12dp"
android:layout_marginEnd="@dimen/horizontal_padding_home"
android:layout_marginBottom="12dp"
android:textAppearance="@style/ChipFont"
android:textColor="?android:textColorSecondary"
app:chipIconTint="?iconColor"

View file

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<dimen name="horizontal_margin">52dp</dimen>
<dimen name="toolbar_margin_horizontal">52dp</dimen>
<dimen name="horizontal_padding_home">52dp</dimen>
</resources>

View file

@ -68,5 +68,5 @@ http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
<dimen name="item_song_height">52dp</dimen>
<dimen name="button_padding_vertical">10dp</dimen>
<dimen name="button_margin_horizontal">4dp</dimen>
<dimen name="horizontal_padding_home">0dp</dimen>
<dimen name="horizontal_padding_home">8dp</dimen>
</resources>