Added empty state

This commit is contained in:
h4h13 2019-11-21 21:26:05 +05:30
commit b66184787d
18 changed files with 305 additions and 135 deletions

View file

@ -43,7 +43,7 @@ class App : MultiDexApplication() {
// default theme // default theme
if (!ThemeStore.isConfigured(this, 3)) { if (!ThemeStore.isConfigured(this, 3)) {
ThemeStore.editTheme(this) ThemeStore.editTheme(this)
.accentColorRes(R.color.md_green_A200) .accentColorRes(R.color.md_deep_purple_A200)
.coloredNavigationBar(true) .coloredNavigationBar(true)
.commit() .commit()
} }

View file

@ -1,120 +1,129 @@
package code.name.monkey.retromusic.fragments.base package code.name.monkey.retromusic.fragments.base
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.*
import android.view.View import androidx.annotation.*
import android.view.ViewGroup
import androidx.annotation.NonNull
import androidx.annotation.StringRes
import androidx.recyclerview.widget.RecyclerView import androidx.recyclerview.widget.RecyclerView
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicPlayerRemote
import code.name.monkey.retromusic.util.DensityUtil import code.name.monkey.retromusic.util.*
import code.name.monkey.retromusic.util.ViewUtil
import com.google.android.material.appbar.AppBarLayout import com.google.android.material.appbar.AppBarLayout
import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView import com.simplecityapps.recyclerview_fastscroll.views.FastScrollRecyclerView
import kotlinx.android.synthetic.main.fragment_main_activity_recycler_view.* import kotlinx.android.synthetic.main.fragment_main_activity_recycler_view.*
abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> : AbsLibraryPagerFragment(), AppBarLayout.OnOffsetChangedListener { abstract class AbsLibraryPagerRecyclerViewFragment<A : RecyclerView.Adapter<*>, LM : RecyclerView.LayoutManager> : AbsLibraryPagerFragment(), AppBarLayout.OnOffsetChangedListener {
protected var adapter: A? = null protected var adapter: A? = null
protected var layoutManager: LM? = null protected var layoutManager: LM? = null
override fun onCreateView(
inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?
): View? {
val view = inflater.inflate(
R.layout.fragment_main_activity_recycler_view, container, false
);
return view
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? { override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
val view = inflater.inflate(R.layout.fragment_main_activity_recycler_view, container, false); super.onViewCreated(view, savedInstanceState)
return view libraryFragment.addOnAppBarOffsetChangedListener(this)
} initLayoutManager()
initAdapter()
setUpRecyclerView()
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) { private fun setUpRecyclerView() {
super.onViewCreated(view, savedInstanceState) if (recyclerView is FastScrollRecyclerView) {
libraryFragment.addOnAppBarOffsetChangedListener(this) ViewUtil.setUpFastScrollRecyclerViewColor(
initLayoutManager() requireActivity(), recyclerView as FastScrollRecyclerView
initAdapter() )
setUpRecyclerView() }
} recyclerView.layoutManager = layoutManager
recyclerView.adapter = adapter
}
private fun setUpRecyclerView() { private fun initAdapter() {
if (recyclerView is FastScrollRecyclerView) { adapter = createAdapter()
ViewUtil.setUpFastScrollRecyclerViewColor(requireActivity(), recyclerView as FastScrollRecyclerView) adapter?.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
} override fun onChanged() {
recyclerView.layoutManager = layoutManager super.onChanged()
recyclerView.adapter = adapter checkIsEmpty()
} checkForPadding()
}
})
}
private fun initAdapter() { protected open val emptyMessage: Int
adapter = createAdapter() @StringRes get() = R.string.empty
adapter?.registerAdapterDataObserver(object : RecyclerView.AdapterDataObserver() {
override fun onChanged() {
super.onChanged()
checkIsEmpty()
checkForPadding()
}
})
}
protected open val emptyMessage: Int private fun getEmojiByUnicode(unicode: Int): String {
@StringRes return String(Character.toChars(unicode))
get() = R.string.empty }
private fun checkIsEmpty() { private fun checkIsEmpty() {
emptyText.setText(emptyMessage) emptyEmoji.text = getEmojiByUnicode(0x1F631)
empty.visibility = if (adapter!!.itemCount == 0) View.VISIBLE else View.GONE emptyText.setText(emptyMessage)
} empty.visibility = if (adapter!!.itemCount == 0) View.VISIBLE else View.GONE
}
private fun checkForPadding() { private fun checkForPadding() {
val itemCount: Int = adapter?.itemCount ?: 0 val itemCount: Int = adapter?.itemCount ?: 0
val params = container.layoutParams as ViewGroup.MarginLayoutParams val params = container.layoutParams as ViewGroup.MarginLayoutParams
if (itemCount > 0 && MusicPlayerRemote.playingQueue.isNotEmpty()) { if (itemCount > 0 && MusicPlayerRemote.playingQueue.isNotEmpty()) {
val height = DensityUtil.dip2px(requireContext(), 104f) val height = DensityUtil.dip2px(requireContext(), 104f)
params.bottomMargin = height params.bottomMargin = height
} else { } else {
val height = DensityUtil.dip2px(requireContext(), 52f) val height = DensityUtil.dip2px(requireContext(), 52f)
params.bottomMargin = height params.bottomMargin = height
} }
} }
private fun initLayoutManager() { private fun initLayoutManager() {
layoutManager = createLayoutManager() layoutManager = createLayoutManager()
} }
protected abstract fun createLayoutManager(): LM protected abstract fun createLayoutManager(): LM
@NonNull @NonNull
protected abstract fun createAdapter(): A protected abstract fun createAdapter(): A
override fun onOffsetChanged(p0: AppBarLayout?, i: Int) { override fun onOffsetChanged(p0: AppBarLayout?, i: Int) {
container.setPadding(container.paddingLeft, container.paddingTop, container.setPadding(
container.paddingRight, libraryFragment.totalAppBarScrollingRange + i) container.paddingLeft,
} container.paddingTop,
container.paddingRight,
libraryFragment.totalAppBarScrollingRange + i
)
}
override fun onQueueChanged() { override fun onQueueChanged() {
super.onQueueChanged() super.onQueueChanged()
checkForPadding() checkForPadding()
} }
override fun onServiceConnected() { override fun onServiceConnected() {
super.onServiceConnected() super.onServiceConnected()
checkForPadding() checkForPadding()
} }
protected fun invalidateLayoutManager() { protected fun invalidateLayoutManager() {
initLayoutManager() initLayoutManager()
recyclerView.layoutManager = layoutManager recyclerView.layoutManager = layoutManager
} }
protected fun invalidateAdapter() { protected fun invalidateAdapter() {
initAdapter() initAdapter()
checkIsEmpty() checkIsEmpty()
recyclerView.adapter = adapter recyclerView.adapter = adapter
} }
override fun onDestroyView() { override fun onDestroyView() {
super.onDestroyView() super.onDestroyView()
libraryFragment.removeOnAppBarOffsetChangedListener(this) libraryFragment.removeOnAppBarOffsetChangedListener(this)
} }
fun recyclerView(): RecyclerView { fun recyclerView(): RecyclerView {
return recyclerView return recyclerView
} }
} }

View file

@ -3,28 +3,18 @@ package code.name.monkey.retromusic.fragments.player.fit
import android.animation.ObjectAnimator import android.animation.ObjectAnimator
import android.graphics.PorterDuff import android.graphics.PorterDuff
import android.os.Bundle import android.os.Bundle
import android.view.LayoutInflater import android.view.*
import android.view.View import android.view.animation.*
import android.view.ViewGroup
import android.view.animation.AccelerateInterpolator
import android.view.animation.DecelerateInterpolator
import android.view.animation.LinearInterpolator
import android.widget.SeekBar import android.widget.SeekBar
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.*
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.appthemehelper.util.TintHelper
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.extensions.ripAlpha import code.name.monkey.retromusic.extensions.ripAlpha
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.*
import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper
import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener import code.name.monkey.retromusic.misc.SimpleOnSeekbarChangeListener
import code.name.monkey.retromusic.service.MusicService import code.name.monkey.retromusic.service.MusicService
import code.name.monkey.retromusic.util.MusicUtil import code.name.monkey.retromusic.util.*
import code.name.monkey.retromusic.util.PreferenceUtil
import kotlinx.android.synthetic.main.fragment_player_playback_controls.* import kotlinx.android.synthetic.main.fragment_player_playback_controls.*
class FitPlaybackControlsFragment : AbsPlayerControlsFragment() { class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
@ -116,7 +106,7 @@ class FitPlaybackControlsFragment : AbsPlayerControlsFragment() {
val colorFinal = if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) { val colorFinal = if (PreferenceUtil.getInstance(requireContext()).adaptiveColor) {
color color
} else { } else {
ThemeStore.accentColor(context!!).ripAlpha() ThemeStore.accentColor(requireContext()).ripAlpha()
} }
volumeFragment?.setTintable(colorFinal) volumeFragment?.setTintable(colorFinal)

View file

@ -50,10 +50,8 @@ interface AlbumsPresenter : Presenter<AlbumsView> {
override fun loadAlbums() { override fun loadAlbums() {
launch { launch {
when (val result = repository.allAlbums()) { when (val result = repository.allAlbums()) {
is Result.Success -> { is Result.Success -> withContext(Dispatchers.Main) {
withContext(Dispatchers.Main) { view?.albums(result.data)
view?.albums(result.data)
}
} }
is Result.Error -> withContext(Dispatchers.Main) { view?.showEmptyView() } is Result.Error -> withContext(Dispatchers.Main) { view?.showEmptyView() }
} }

View file

@ -0,0 +1,146 @@
package code.name.monkey.retromusic.util;
import android.annotation.TargetApi;
import android.content.res.ColorStateList;
import android.graphics.Color;
import android.os.Build;
import android.util.StateSet;
import androidx.annotation.ColorInt;
import androidx.annotation.Nullable;
import androidx.core.graphics.ColorUtils;
public class RippleUtils {
public static final boolean USE_FRAMEWORK_RIPPLE = Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP;
private static final int[] PRESSED_STATE_SET = {
android.R.attr.state_pressed,
};
private static final int[] HOVERED_FOCUSED_STATE_SET = {
android.R.attr.state_hovered, android.R.attr.state_focused,
};
private static final int[] FOCUSED_STATE_SET = {
android.R.attr.state_focused,
};
private static final int[] HOVERED_STATE_SET = {
android.R.attr.state_hovered,
};
private static final int[] SELECTED_PRESSED_STATE_SET = {
android.R.attr.state_selected, android.R.attr.state_pressed,
};
private static final int[] SELECTED_HOVERED_FOCUSED_STATE_SET = {
android.R.attr.state_selected, android.R.attr.state_hovered, android.R.attr.state_focused,
};
private static final int[] SELECTED_FOCUSED_STATE_SET = {
android.R.attr.state_selected, android.R.attr.state_focused,
};
private static final int[] SELECTED_HOVERED_STATE_SET = {
android.R.attr.state_selected, android.R.attr.state_hovered,
};
private static final int[] SELECTED_STATE_SET = {
android.R.attr.state_selected,
};
private static final int[] ENABLED_PRESSED_STATE_SET = {
android.R.attr.state_enabled, android.R.attr.state_pressed
};
public static ColorStateList convertToRippleDrawableColor(@Nullable ColorStateList rippleColor) {
if (USE_FRAMEWORK_RIPPLE) {
int size = 2;
final int[][] states = new int[size][];
final int[] colors = new int[size];
int i = 0;
// Ideally we would define a different composite color for each state, but that causes the
// ripple animation to abort prematurely.
// So we only allow two base states: selected, and non-selected. For each base state, we only
// base the ripple composite on its pressed state.
// Selected base state.
states[i] = SELECTED_STATE_SET;
colors[i] = getColorForState(rippleColor, SELECTED_PRESSED_STATE_SET);
i++;
// Non-selected base state.
states[i] = StateSet.NOTHING;
colors[i] = getColorForState(rippleColor, PRESSED_STATE_SET);
i++;
return new ColorStateList(states, colors);
} else {
int size = 10;
final int[][] states = new int[size][];
final int[] colors = new int[size];
int i = 0;
states[i] = SELECTED_PRESSED_STATE_SET;
colors[i] = getColorForState(rippleColor, SELECTED_PRESSED_STATE_SET);
i++;
states[i] = SELECTED_HOVERED_FOCUSED_STATE_SET;
colors[i] = getColorForState(rippleColor, SELECTED_HOVERED_FOCUSED_STATE_SET);
i++;
states[i] = SELECTED_FOCUSED_STATE_SET;
colors[i] = getColorForState(rippleColor, SELECTED_FOCUSED_STATE_SET);
i++;
states[i] = SELECTED_HOVERED_STATE_SET;
colors[i] = getColorForState(rippleColor, SELECTED_HOVERED_STATE_SET);
i++;
// Checked state.
states[i] = SELECTED_STATE_SET;
colors[i] = Color.TRANSPARENT;
i++;
states[i] = PRESSED_STATE_SET;
colors[i] = getColorForState(rippleColor, PRESSED_STATE_SET);
i++;
states[i] = HOVERED_FOCUSED_STATE_SET;
colors[i] = getColorForState(rippleColor, HOVERED_FOCUSED_STATE_SET);
i++;
states[i] = FOCUSED_STATE_SET;
colors[i] = getColorForState(rippleColor, FOCUSED_STATE_SET);
i++;
states[i] = HOVERED_STATE_SET;
colors[i] = getColorForState(rippleColor, HOVERED_STATE_SET);
i++;
// Default state.
states[i] = StateSet.NOTHING;
colors[i] = Color.TRANSPARENT;
i++;
return new ColorStateList(states, colors);
}
}
@ColorInt
private static int getColorForState(@Nullable ColorStateList rippleColor, int[] state) {
int color;
if (rippleColor != null) {
color = rippleColor.getColorForState(state, rippleColor.getDefaultColor());
} else {
color = Color.TRANSPARENT;
}
return USE_FRAMEWORK_RIPPLE ? doubleAlpha(color) : color;
}
/**
* On API 21+, the framework composites a ripple color onto the display at about 50% opacity.
* Since we are providing precise ripple colors, cancel that out by doubling the opacity here.
*/
@ColorInt
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private static int doubleAlpha(@ColorInt int color) {
int alpha = Math.min(2 * Color.alpha(color), 255);
return ColorUtils.setAlphaComponent(color, alpha);
}
}

View file

@ -15,13 +15,17 @@
package code.name.monkey.retromusic.views package code.name.monkey.retromusic.views
import android.content.Context import android.content.Context
import android.content.res.ColorStateList
import android.graphics.drawable.RippleDrawable
import android.util.AttributeSet import android.util.AttributeSet
import androidx.core.content.ContextCompat
import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ATHUtil import code.name.monkey.appthemehelper.util.ATHUtil
import code.name.monkey.appthemehelper.util.ColorUtil import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.NavigationViewUtil import code.name.monkey.appthemehelper.util.NavigationViewUtil
import code.name.monkey.retromusic.R import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.util.PreferenceUtil import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.RippleUtils
import com.google.android.material.bottomnavigation.BottomNavigationView import com.google.android.material.bottomnavigation.BottomNavigationView
class BottomNavigationBarTinted @JvmOverloads constructor( class BottomNavigationBarTinted @JvmOverloads constructor(
@ -38,7 +42,11 @@ class BottomNavigationBarTinted @JvmOverloads constructor(
val accentColor = ThemeStore.accentColor(context) val accentColor = ThemeStore.accentColor(context)
NavigationViewUtil.setItemIconColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor) NavigationViewUtil.setItemIconColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor)
NavigationViewUtil.setItemTextColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor) NavigationViewUtil.setItemTextColors(this, ColorUtil.withAlpha(iconColor, 0.5f), accentColor)
itemBackground = RippleDrawable(RippleUtils.convertToRippleDrawableColor(ColorStateList.valueOf(ThemeStore.accentColor(context).addAlpha())), ContextCompat.getDrawable(context, R.drawable.bottom_navigation_item_background), null)
setOnApplyWindowInsetsListener(null) setOnApplyWindowInsetsListener(null)
} }
} }
private fun Int.addAlpha(): Int {
return ColorUtil.withAlpha(this, 0.12f)
}

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
android:color="?android:attr/colorControlHighlight">
<item android:id="@android:id/mask">
<shape android:shape="rectangle">
<solid android:color="#000000" />
<corners android:radius="15dp" />
</shape>
</item>
<item android:drawable="@drawable/bottom_navigation_item_background" />
</ripple>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="8dp" />
<solid android:color="?colorPrimary" />
</shape>

View file

@ -7,8 +7,5 @@
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@color/md_white_1000"
android:pathData="M 10 4 C 7.79 4 6 5.79 6 8 C 6 10.21 7.79 12 10 12 C 12.21 12 14 10.21 14 8 C 14 5.79 12.21 4 10 4 z M 10 14 C 7.33 14 2 15.34 2 18 L 2 19 C 2 19.55 2.45 20 3 20 L 12.007812 20 A 5 5 0 0 1 11 17 A 5 5 0 0 1 11.867188 14.1875 C 11.186145 14.077427 10.532166 14 10 14 z" /> android:pathData="M11,14C12,14 13.05,14.16 14.2,14.44C13.39,15.31 13,16.33 13,17.5C13,18.39 13.25,19.23 13.78,20H3V18C3,16.81 3.91,15.85 5.74,15.12C7.57,14.38 9.33,14 11,14M11,12C9.92,12 9,11.61 8.18,10.83C7.38,10.05 7,9.11 7,8C7,6.92 7.38,6 8.18,5.18C9,4.38 9.92,4 11,4C12.11,4 13.05,4.38 13.83,5.18C14.61,6 15,6.92 15,8C15,9.11 14.61,10.05 13.83,10.83C13.05,11.61 12.11,12 11,12M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 19 8 A 2 2 0 0 0 17 10 L 17 14.173828 C 16.678959 14.059508 16.340787 14.000724 16 14 C 14.343146 14 13 15.343146 13 17 C 13 18.656854 14.343146 20 16 20 C 17.656854 20 19 18.656854 19 17 L 19 10 L 21 10 C 21.554 10 22 9.554 22 9 C 22 8.446 21.554 8 21 8 L 19 8 z" />
</vector> </vector>

View file

@ -6,8 +6,5 @@
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@color/md_white_1000"
android:pathData="M 10 4 C 7.789999 4 6 5.79 6 8 C 6 10.21 7.789999 12 10 12 C 12.21 12 14 10.21 14 8 C 14 5.79 12.21 4 10 4 z M 10 6 C 11.1 6 12 6.9 12 8 C 12 9.1 11.1 10 10 10 C 8.899999 10 8 9.1 8 8 C 8 6.9 8.899999 6 10 6 z M 10 14 C 7.329999 14 2 15.34 2 18 L 2 20 L 13.007812 20 A 5 5 0 0 1 12.105469 18 L 4 18 C 4.23 17.28 7.309999 16 10 16 C 10.681642 16 11.388828 16.082448 12.068359 16.216797 A 5 5 0 0 1 12.771484 14.34375 C 11.755351 14.12326 10.766662 14 10 14 z" /> android:pathData="M11,4A4,4 0 0,1 15,8A4,4 0 0,1 11,12A4,4 0 0,1 7,8A4,4 0 0,1 11,4M11,6A2,2 0 0,0 9,8A2,2 0 0,0 11,10A2,2 0 0,0 13,8A2,2 0 0,0 11,6M11,13C12.1,13 13.66,13.23 15.11,13.69C14.5,14.07 14,14.6 13.61,15.23C12.79,15.03 11.89,14.9 11,14.9C8.03,14.9 4.9,16.36 4.9,17V18.1H13.04C13.13,18.8 13.38,19.44 13.76,20H3V17C3,14.34 8.33,13 11,13M18.5,10H20L22,10V12H20V17.5A2.5,2.5 0 0,1 17.5,20A2.5,2.5 0 0,1 15,17.5A2.5,2.5 0 0,1 17.5,15C17.86,15 18.19,15.07 18.5,15.21V10Z" />
<path
android:fillColor="@color/md_white_1000"
android:pathData="M 18 8 L 18 10 L 18 14.173828 A 3 3 0 0 0 17 14 A 3 3 0 0 0 14 17 A 3 3 0 0 0 17 20 A 3 3 0 0 0 20 17 L 20 10 L 22 10 L 22 8 L 20 8 L 18 8 z M 17 16 A 1 1 0 0 1 18 17 A 1 1 0 0 1 17 18 A 1 1 0 0 1 16 17 A 1 1 0 0 1 17 16 z" />
</vector> </vector>

View file

@ -6,5 +6,5 @@
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@color/md_white_1000"
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-6zm-2 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z" /> android:pathData="M12 3l0.01 10.55c-0.59-0.34-1.27-0.55-2-0.55C7.79 13 6 14.79 6 17s1.79 4 4.01 4S14 19.21 14 17V7h4V3h-6zm-1.99 16c-1.1 0-2-0.9-2-2s0.9-2 2-2 2 0.9 2 2-0.9 2-2 2z" />
</vector> </vector>

View file

@ -7,5 +7,5 @@
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@color/md_white_1000"
android:pathData="M12 3v9.28c-0.47-0.17-0.97-0.28-1.5-0.28C8.01 12 6 14.01 6 16.5S8.01 21 10.5 21c2.31 0 4.2-1.75 4.45-4H15V6h4V3h-7z" /> 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> </vector>

View file

@ -20,5 +20,5 @@
android:viewportHeight="24"> android:viewportHeight="24">
<path <path
android:fillColor="@color/md_white_1000" android:fillColor="@color/md_white_1000"
android:pathData="M12,3V8.68L15,11.68V6H19V3H12M5.28,4.5L4,5.77L10.26,12.03C7.89,12.15 6,14.1 6,16.5C6,19 8,21 10.5,21C12.9,21 14.85,19.11 14.97,16.74L19.68,21.45L20.96,20.18L15,14.22L12,11.22L5.28,4.5Z" /> android:pathData="M14 7H18V3H12V7.61L14 9.61M12 10.44L4.41 2.86L3 4.27L12 13.27V13.55A3.94 3.94 0 0 0 8.67 13.23A4 4 0 0 0 10.65 20.95A4.1 4.1 0 0 0 14 16.85V15.27L19.73 21L21.14 19.59M10 19A2 2 0 1 1 12 17A2 2 0 0 1 10 19Z" />
</vector> </vector>

View file

@ -25,11 +25,13 @@
android:visibility="gone" android:visibility="gone"
tools:visibility="visible"> tools:visibility="visible">
<androidx.appcompat.widget.AppCompatImageView <com.google.android.material.textview.MaterialTextView
android:layout_width="96dp" android:id="@+id/emptyEmoji"
android:layout_height="96dp" android:layout_width="wrap_content"
app:srcCompat="@drawable/ic_music_note_off_white_24dp" android:layout_height="wrap_content"
app:tint="?colorOnSurface" /> android:layout_marginBottom="16dp"
android:text="@string/empty_text_emoji"
android:textAppearance="@style/TextViewHeadline3" />
<com.google.android.material.textview.MaterialTextView <com.google.android.material.textview.MaterialTextView
android:id="@+id/emptyText" android:id="@+id/emptyText"
@ -37,7 +39,7 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center" android:layout_gravity="center"
android:text="@string/empty" android:text="@string/empty"
android:textAppearance="@style/TextViewNormal" android:textAppearance="@style/TextViewHeadline5"
android:textColor="?colorOnSecondary" android:textColor="?colorOnSecondary"
tools:visibility="visible" /> tools:visibility="visible" />
</LinearLayout> </LinearLayout>

View file

@ -53,11 +53,13 @@
android:background="?colorSecondary" android:background="?colorSecondary"
android:elevation="0dp" android:elevation="0dp"
android:visibility="gone" android:visibility="gone"
app:itemBackground="@drawable/bottom_navigation_item_background"
app:itemIconTint="@drawable/bottom_navigation_item_colors" app:itemIconTint="@drawable/bottom_navigation_item_colors"
app:itemTextAppearanceActive="@style/BottomSheetItemTextAppearanceActive" app:itemTextAppearanceActive="@style/BottomSheetItemTextAppearanceActive"
app:itemTextAppearanceInactive="@style/BottomSheetItemTextAppearanceInactive" app:itemTextAppearanceInactive="@style/BottomSheetItemTextAppearanceInactive"
app:itemTextColor="@drawable/bottom_navigation_item_colors" app:itemTextColor="@drawable/bottom_navigation_item_colors"
app:labelVisibilityMode="labeled" app:labelVisibilityMode="labeled"
app:itemHorizontalTranslationEnabled="false"
app:menu="@menu/bottom_navigation_main" app:menu="@menu/bottom_navigation_main"
tools:layout_height="56dp" /> tools:layout_height="56dp" />

View file

@ -18,4 +18,6 @@
<string name="app_shortcut_last_added_short" translatable="false">@string/last_added</string> <string name="app_shortcut_last_added_short" translatable="false">@string/last_added</string>
<string name="app_shortcut_shuffle_all_long" translatable="false">@string/action_shuffle_all</string> <string name="app_shortcut_shuffle_all_long" translatable="false">@string/action_shuffle_all</string>
<string name="app_shortcut_top_tracks_long" translatable="false">@string/my_top_tracks</string> <string name="app_shortcut_top_tracks_long" translatable="false">@string/my_top_tracks</string>
<string name="empty_text_emoji" translatable="false">&#129300;</string>
</resources> </resources>

View file

@ -3,7 +3,7 @@
<string name="about_settings_summary">Team, social links</string> <string name="about_settings_summary">Team, social links</string>
<string name="accent_color">Accent color</string> <string name="accent_color">Accent color</string>
<string name="accent_color_desc">The theme accent color, defaults to teal</string> <string name="accent_color_desc">The theme accent color, defaults to purple</string>
<string name="action_about">About</string> <string name="action_about">About</string>
<string name="action_add_to_favorites">Add to favorites</string> <string name="action_add_to_favorites">Add to favorites</string>
@ -329,16 +329,16 @@
<string name="next_song">Next Song</string> <string name="next_song">Next Song</string>
<string name="no_albums">No albums</string> <string name="no_albums">You have no albums</string>
<string name="no_artists">No artists</string> <string name="no_artists">You have no artists</string>
<string name="no_audio_ID">"Play a song first, then try again."</string> <string name="no_audio_ID">"Play a song first, then try again."</string>
<string name="no_equalizer">No equalizer found</string> <string name="no_equalizer">No equalizer found</string>
<string name="no_genres">No genres</string> <string name="no_genres">You have no genres</string>
<string name="no_lyrics_found">No lyrics found</string> <string name="no_lyrics_found">No lyrics found</string>
<string name="no_playlists">No playlists</string> <string name="no_playlists">You have no playlists</string>
<string name="no_purchase_found">No purchase found.</string> <string name="no_purchase_found">No purchase found.</string>
<string name="no_results">No results</string> <string name="no_results">No results</string>
<string name="no_songs">No songs</string> <string name="no_songs">You have no songs</string>
<string name="normal">Normal</string> <string name="normal">Normal</string>
<string name="normal_lyrics">Normal lyrics</string> <string name="normal_lyrics">Normal lyrics</string>

View file

@ -68,10 +68,12 @@
<style name="BottomSheetItemTextAppearanceInactive" parent="Widget.MaterialComponents.BottomNavigationView.Colored"> <style name="BottomSheetItemTextAppearanceInactive" parent="Widget.MaterialComponents.BottomNavigationView.Colored">
<item name="android:fontFamily">@font/circular</item> <item name="android:fontFamily">@font/circular</item>
<item name="android:textSize">14sp</item>
</style> </style>
<style name="BottomSheetItemTextAppearanceActive" parent="Widget.MaterialComponents.BottomNavigationView.Colored"> <style name="BottomSheetItemTextAppearanceActive" parent="Widget.MaterialComponents.BottomNavigationView.Colored">
<item name="android:fontFamily">@font/circular</item> <item name="android:fontFamily">@font/circular</item>
<item name="android:textSize">14sp</item>
</style> </style>
<style name="Fab" parent="FabParent" /> <style name="Fab" parent="FabParent" />