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? { override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
dialog?.window?.let { dialog?.window?.let {
(requireActivity() as MainActivity).setNavigationBarColorPrimary()
(requireActivity() as MainActivity).setLightNavigationBar(true) (requireActivity() as MainActivity).setLightNavigationBar(true)
} }

View file

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

View file

@ -40,7 +40,7 @@ import kotlinx.android.synthetic.main.fragment_classic_player_playback_controls.
import kotlin.math.max import kotlin.math.max
class ClassicPlayerFragment : AbsPlayerFragment(), SlidingUpPanelLayout.PanelSlideListener { class ClassicPlayerFragment : AbsPlayerFragment(), SlidingUpPanelLayout.PanelSlideListener {
override fun onPanelSlide(p0: View?, p1: Float) { override fun onPanelSlide(p0: View?, p1: Float) {
} }

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -11,16 +11,18 @@
android:id="@+id/appBarLayout" android:id="@+id/appBarLayout"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:elevation="0dp"
android:fitsSystemWindows="true" android:fitsSystemWindows="true"
app:elevation="0dp"> app:liftOnScroll="true">
<com.google.android.material.card.MaterialCardView <com.google.android.material.card.MaterialCardView
android:id="@+id/searchContainer" android:id="@+id/searchContainer"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="@dimen/toolbar_margin_horizontal"
android:layout_marginEnd="8dp" 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:cardCornerRadius="8dp"
app:cardElevation="0dp" app:cardElevation="0dp"
app:cardUseCompatPadding="true" app:cardUseCompatPadding="true"
@ -33,12 +35,13 @@
android:layout_height="50dp" android:layout_height="50dp"
android:gravity="center_vertical"> android:gravity="center_vertical">
<code.name.monkey.retromusic.views.IconImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/back" android:id="@+id/back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:padding="14dp" 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 <com.google.android.material.textfield.TextInputEditText
@ -55,44 +58,50 @@
<requestFocus /> <requestFocus />
</com.google.android.material.textfield.TextInputEditText> </com.google.android.material.textfield.TextInputEditText>
<code.name.monkey.retromusic.views.IconImageView <androidx.appcompat.widget.AppCompatImageView
android:id="@+id/voiceSearch" android:id="@+id/voiceSearch"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="0" android:layout_weight="0"
android:background="?roundSelector" android:background="?roundSelector"
android:padding="14dp" android:padding="14dp"
app:srcCompat="@drawable/ic_mic_white_24dp" /> app:srcCompat="@drawable/ic_mic_white_24dp"
app:tint="?colorOnSurface"
tools:visibility="visible" />
</LinearLayout> </LinearLayout>
</com.google.android.material.card.MaterialCardView> </com.google.android.material.card.MaterialCardView>
</com.google.android.material.appbar.AppBarLayout> </com.google.android.material.appbar.AppBarLayout>
<FrameLayout <androidx.core.widget.NestedScrollView
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior"> app:layout_behavior="com.google.android.material.appbar.AppBarLayout$ScrollingViewBehavior">
<com.google.android.material.textview.MaterialTextView <FrameLayout
android:id="@android:id/empty"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content">
android:gravity="center"
android:paddingTop="48dp"
android:paddingBottom="48dp"
android:text="@string/no_results"
android:textAppearance="@style/TextViewHeadline6"
android:visibility="gone"
tools:visibility="visible" />
<androidx.recyclerview.widget.RecyclerView <com.google.android.material.textview.MaterialTextView
android:id="@+id/recyclerView" android:id="@android:id/empty"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:clipToPadding="false" android:gravity="center"
android:scrollbarStyle="outsideOverlay" android:paddingTop="48dp"
android:scrollbars="vertical" android:paddingBottom="48dp"
app:layout_behavior="@string/appbar_scrolling_view_behavior" /> android:text="@string/no_results"
</FrameLayout> android:textAppearance="@style/TextViewHeadline6"
android:visibility="gone"
tools:visibility="visible" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:clipToPadding="false"
android:scrollbarStyle="outsideOverlay"
android:scrollbars="vertical" />
</FrameLayout>
</androidx.core.widget.NestedScrollView>
<com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton <com.google.android.material.floatingactionbutton.ExtendedFloatingActionButton
android:id="@+id/keyboardPopup" android:id="@+id/keyboardPopup"

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="horizontal_margin">52dp</dimen> <dimen name="horizontal_margin">52dp</dimen>
<dimen name="toolbar_margin_horizontal">52dp</dimen>
<dimen name="horizontal_padding_home">52dp</dimen>
</resources> </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="item_song_height">52dp</dimen>
<dimen name="button_padding_vertical">10dp</dimen> <dimen name="button_padding_vertical">10dp</dimen>
<dimen name="button_margin_horizontal">4dp</dimen> <dimen name="button_margin_horizontal">4dp</dimen>
<dimen name="horizontal_padding_home">0dp</dimen> <dimen name="horizontal_padding_home">8dp</dimen>
</resources> </resources>