Adding copy right signature

main
h4h13 2019-08-05 23:14:05 +05:30
parent 147b8b5292
commit 8efadd9a79
23 changed files with 245 additions and 120 deletions

View File

@ -30,7 +30,9 @@ class PlayingQueueActivity : AbsMusicServiceActivity() {
private val upNextAndQueueTime: String
get() = resources.getString(R.string.up_next) + "" + MusicUtil.getReadableDurationString(MusicPlayerRemote.getQueueDurationMillis(MusicPlayerRemote.position))
override fun onCreate(savedInstanceState: Bundle?) {
override fun onCreate(
savedInstanceState: Bundle?
) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_playing_queue)

View File

@ -260,6 +260,8 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
super.setTaskDescriptionColor(paletteColor)
val isColorLight = ColorUtil.isColorLight(paletteColor)
if (PreferenceUtil.getInstance().adaptiveColor &&
(currentNowPlayingScreen == NORMAL || currentNowPlayingScreen == FLAT)) {
super.setLightNavigationBar(true)
@ -269,7 +271,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
currentNowPlayingScreen == BLUR || currentNowPlayingScreen == BLUR_CARD) {
super.setLightStatusbar(false)
super.setLightNavigationBar(true)
} else if (currentNowPlayingScreen == COLOR) {
} else if (currentNowPlayingScreen == COLOR || currentNowPlayingScreen == TINY) {
super.setNavigationbarColor(paletteColor)
super.setLightNavigationBar(isColorLight)
super.setLightStatusbar(isColorLight)
@ -310,7 +312,7 @@ abstract class AbsSlidingMusicPanelActivity : AbsMusicServiceActivity(), Sliding
}
fun updateTabs() {
private fun updateTabs() {
bottomNavigationView.menu.clear()
val currentTabs = PreferenceUtil.getInstance().libraryCategoryInfos
for (tab in currentTabs) {

View File

@ -77,11 +77,7 @@ abstract class AbsThemeActivity : ATHActivity(), Runnable {
}
fun setDrawUnderStatusBar() {
if (VersionUtils.hasLollipop()) {
RetroUtil.setAllowDrawUnderStatusBar(window)
} else if (VersionUtils.hasKitKat()) {
RetroUtil.setStatusBarTranslucent(window)
}
RetroUtil.setAllowDrawUnderStatusBar(window)
}
fun setDrawUnderNavigationBar() {
@ -95,19 +91,17 @@ abstract class AbsThemeActivity : ATHActivity(), Runnable {
* @param color the new statusbar color (will be shifted down on Lollipop and above)
*/
fun setStatusbarColor(color: Int) {
if (VersionUtils.hasKitKat()) {
val statusBar = window.decorView.rootView.findViewById<View>(R.id.status_bar)
if (statusBar != null) {
when {
VersionUtils.hasMarshmallow() -> window.statusBarColor = color
VersionUtils.hasLollipop() -> statusBar.setBackgroundColor(ColorUtil.darkenColor(color))
else -> statusBar.setBackgroundColor(color)
}
} else {
when {
VersionUtils.hasMarshmallow() -> window.statusBarColor = color
else -> window.statusBarColor = ColorUtil.darkenColor(color)
}
val statusBar = window.decorView.rootView.findViewById<View>(R.id.status_bar)
if (statusBar != null) {
when {
VersionUtils.hasMarshmallow() -> window.statusBarColor = color
VersionUtils.hasLollipop() -> statusBar.setBackgroundColor(ColorUtil.darkenColor(color))
else -> statusBar.setBackgroundColor(color)
}
} else {
when {
VersionUtils.hasMarshmallow() -> window.statusBarColor = color
else -> window.statusBarColor = ColorUtil.darkenColor(color)
}
}
setLightStatusbarAuto(color)

View File

@ -40,7 +40,6 @@ abstract class AbsMainActivityFragment : AbsMusicServiceFragment() {
fun setStatusbarColorAuto(view: View) {
// we don't want to use statusbar color because we are doing the color darkening on our own to support KitKat
if (VersionUtils.hasMarshmallow()) {
setStatusbarColor(view, ThemeStore.primaryColor(context!!))
} else {

View File

@ -89,32 +89,35 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)
toolbar = view.findViewById(R.id.toolbar)
bannerImage?.setOnClickListener {
NavigationUtil.goToUserInfo(activity!!)
NavigationUtil.goToUserInfo(requireActivity())
}
if (!PreferenceUtil.getInstance().isHomeBanner)
setStatusbarColorAuto(view)
lastAdded.setOnClickListener {
NavigationUtil.goToPlaylistNew(mainActivity, LastAddedPlaylist(mainActivity))
NavigationUtil.goToPlaylistNew(requireActivity(), LastAddedPlaylist(requireActivity()))
}
topPlayed.setOnClickListener {
NavigationUtil.goToPlaylistNew(mainActivity, MyTopTracksPlaylist(mainActivity))
NavigationUtil.goToPlaylistNew(requireActivity(), MyTopTracksPlaylist(requireActivity()))
}
actionShuffle.setOnClickListener {
MusicPlayerRemote.openAndShuffleQueue(SongLoader.getAllSongs(mainActivity) , true)
MusicPlayerRemote.openAndShuffleQueue(SongLoader.getAllSongs(requireActivity()) , true)
}
history.setOnClickListener {
NavigationUtil.goToPlaylistNew(mainActivity, HistoryPlaylist(mainActivity))
NavigationUtil.goToPlaylistNew(requireActivity(), HistoryPlaylist(requireActivity()))
}
homePresenter = HomePresenter(this)
contentContainer.setBackgroundColor(ThemeStore.primaryColor(context!!))
contentContainer.setBackgroundColor(ThemeStore.primaryColor(requireContext()))
setupToolbar()
homeAdapter = HomeAdapter(mainActivity, ArrayList(), displayMetrics)
@ -124,16 +127,16 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
checkPadding()
userInfoContainer.setOnClickListener {
NavigationUtil.goToUserInfo(activity!!)
NavigationUtil.goToUserInfo(requireActivity())
}
titleWelcome.setTextColor(ThemeStore.textColorPrimary(context!!))
titleWelcome.setTextColor(ThemeStore.textColorPrimary(requireContext()))
titleWelcome.text = String.format("%s", PreferenceUtil.getInstance().userName)
}
private fun checkPadding() {
val marginSpan = when {
MusicPlayerRemote.playingQueue.isEmpty() -> RetroUtil.convertDpToPixel(52f, context!!).toInt()
else -> RetroUtil.convertDpToPixel(0f, context!!).toInt()
else -> RetroUtil.convertDpToPixel(0f, requireContext()).toInt()
}
(recyclerView.layoutParams as ViewGroup.MarginLayoutParams).bottomMargin = (marginSpan * 2.3f).toInt()
@ -154,7 +157,7 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
setNavigationIcon(R.drawable.ic_menu_white_24dp)
setOnClickListener {
val pairImageView = Pair.create<View, String>(toolbarContainer, resources.getString(R.string.transition_toolbar))
NavigationUtil.goToSearch(activity!!, pairImageView)
NavigationUtil.goToSearch(requireActivity(), pairImageView)
}
}
@ -219,20 +222,18 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
super.onCreateOptionsMenu(menu, inflater)
inflater.inflate(R.menu.menu_search, menu)
val activity = activity ?: return
ToolbarContentTintHelper.handleOnCreateOptionsMenu(activity, toolbar, menu, ATHToolbarActivity.getToolbarBackgroundColor(toolbar))
ToolbarContentTintHelper.handleOnCreateOptionsMenu(requireActivity(), toolbar, menu, ATHToolbarActivity.getToolbarBackgroundColor(toolbar))
}
override fun onPrepareOptionsMenu(menu: Menu) {
super.onPrepareOptionsMenu(menu)
val activity = activity ?: return
ToolbarContentTintHelper.handleOnPrepareOptionsMenu(activity, toolbar)
ToolbarContentTintHelper.handleOnPrepareOptionsMenu(requireActivity(), toolbar)
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
if (item.itemId == R.id.action_search) {
val pairImageView = Pair.create<View, String>(toolbarContainer, resources.getString(R.string.transition_toolbar))
NavigationUtil.goToSearch(mainActivity, true, pairImageView)
NavigationUtil.goToSearch(requireActivity(), true, pairImageView)
}
return super.onOptionsItemSelected(item)
}
@ -258,13 +259,13 @@ class BannerHomeFragment : AbsMainActivityFragment(), MainActivityFragmentCallba
private fun loadTimeImage(day: String) {
if (bannerImage != null) {
if (PreferenceUtil.getInstance().bannerImage.isEmpty()) {
GlideApp.with(activity!!)
GlideApp.with(requireActivity())
.load(day)
.placeholder(R.drawable.material_design_default)
.diskCacheStrategy(DiskCacheStrategy.ALL)
.into(bannerImage!!)
} else {
disposable.add(Compressor(context!!)
disposable.add(Compressor(requireActivity())
.setQuality(100)
.setCompressFormat(Bitmap.CompressFormat.WEBP)
.compressToBitmapAsFlowable(File(PreferenceUtil.getInstance().bannerImage, USER_BANNER))

View File

@ -169,47 +169,6 @@ class ColorFragment : AbsPlayerFragment() {
setColors(backgroundColor, textColor)
}
})
/*SongGlideRequest.Builder.from(Glide.with(activity), MusicPlayerRemote.currentSong)
.checkIgnoreMediaStore(activity!!)
.generatePalette(activity).build().dontAnimate()
.into(object : RetroMusicColoredTarget(playerImage) {
override fun onColorReady(color: Int) {
//setColors(color);
}
override fun onLoadFailed(e: Exception?, errorDrawable: Drawable?) {
super.onLoadFailed(e, errorDrawable)
val backgroundColor = defaultFooterColor
val textColor = if (ColorUtil.isColorLight(defaultFooterColor))
MaterialValueHelper.getPrimaryTextColor(context, true)
else
MaterialValueHelper.getPrimaryTextColor(context, false)
setColors(backgroundColor, textColor)
}
override fun onResourceReady(resource: BitmapPaletteWrapper,
glideAnimation: GlideAnimation<in BitmapPaletteWrapper>?) {
super.onResourceReady(resource, glideAnimation)
*//* MediaNotificationProcessor processor = new MediaNotificationProcessor(getContext(),
getContext());
Palette.Builder builder = MediaNotificationProcessor
.generatePalette(resource.getBitmap());
int backgroundColor = processor.getBackgroundColor(builder);
int textColor = processor.getTextColor(builder);*//*
val palette = resource.palette
val swatch = RetroColorUtil.getSwatch(palette)
val textColor = RetroColorUtil.getTextColor(palette)
val backgroundColor = swatch.rgb
setColors(backgroundColor, textColor)
}
})*/
}
private fun setColors(backgroundColor: Int, textColor: Int) {

View File

@ -5,7 +5,8 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import code.name.monkey.appthemehelper.ThemeStore
import code.name.monkey.appthemehelper.util.ColorUtil
import code.name.monkey.appthemehelper.util.MaterialValueHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.fragments.base.AbsPlayerControlsFragment
import code.name.monkey.retromusic.helper.MusicPlayerRemote
@ -28,8 +29,13 @@ class TinyPlaybackControlsFragment : AbsPlayerControlsFragment() {
override fun setDark(color: Int) {
lastPlaybackControlsColor = ThemeStore.textColorPrimary(requireContext())
lastDisabledPlaybackControlsColor = ThemeStore.textColorSecondary(requireContext())
if (ColorUtil.isColorLight(color)) {
lastPlaybackControlsColor = MaterialValueHelper.getSecondaryTextColor(requireContext(), true)
lastDisabledPlaybackControlsColor = MaterialValueHelper.getSecondaryDisabledTextColor(requireContext(), true)
} else {
lastPlaybackControlsColor = MaterialValueHelper.getPrimaryTextColor(requireContext(), false)
lastDisabledPlaybackControlsColor = MaterialValueHelper.getPrimaryDisabledTextColor(requireContext(), false)
}
updateRepeatState();
updateShuffleState();

View File

@ -11,7 +11,6 @@ import androidx.appcompat.widget.Toolbar
import code.name.monkey.appthemehelper.ThemeStore
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.appthemehelper.util.ToolbarContentTintHelper
import code.name.monkey.retromusic.R
import code.name.monkey.retromusic.fragments.MiniPlayerFragment
@ -23,6 +22,7 @@ import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler
import code.name.monkey.retromusic.model.Song
import code.name.monkey.retromusic.util.MusicUtil
import code.name.monkey.retromusic.util.PreferenceUtil
import code.name.monkey.retromusic.util.ViewUtil
import kotlinx.android.synthetic.main.fragment_tiny_player.*
class TinyPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Callback {
@ -59,28 +59,46 @@ class TinyPlayerFragment : AbsPlayerFragment(), MusicProgressViewUpdateHelper.Ca
}
override fun toolbarIconColor(): Int {
return ThemeStore.textColorSecondary(requireContext())
return textColorPrimary
}
private var lastColor: Int = 0
override val paletteColor: Int
get() = lastColor
private var textColorPrimary = 0
private var textColorPrimaryDisabled = 0
override fun onColorChanged(color: Int) {
val lastColor = if (PreferenceUtil.getInstance().adaptiveColor) {
val colorFinal = if (PreferenceUtil.getInstance().adaptiveColor) {
color
} else {
ThemeStore.accentColor(requireContext())
}
if (ColorUtil.isColorLight(color)) {
textColorPrimary = MaterialValueHelper.getSecondaryTextColor(requireContext(), true)
textColorPrimaryDisabled = MaterialValueHelper.getSecondaryTextColor(requireContext(), true)
} else {
textColorPrimary = MaterialValueHelper.getPrimaryTextColor(requireContext(), false)
textColorPrimaryDisabled = MaterialValueHelper.getSecondaryTextColor(requireContext(), false)
}
this.lastColor = colorFinal
callbacks?.onPaletteColorChanged()
tinyPlaybackControlsFragment.setDark(lastColor)
tinyPlaybackControlsFragment.setDark(colorFinal)
TintHelper.setTintAuto(progressBar, lastColor, false)
ViewUtil.setProgressDrawable(progressBar, colorFinal)
val iconColor = ThemeStore.textColorSecondary(requireContext())
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, iconColor, requireActivity())
songTitle.setTextColor(textColorPrimary)
songText.setTextColor(textColorPrimaryDisabled)
playerSongTotalTime.setTextColor(textColorPrimary)
ToolbarContentTintHelper.colorizeToolbar(playerToolbar, textColorPrimary, requireActivity())
}
override fun onFavoriteToggled() {

View File

@ -60,12 +60,14 @@ object ViewUtil {
val ld = progressSlider.progressDrawable as LayerDrawable
val clipDrawableProgress = ld.findDrawableByLayerId(android.R.id.progress)
clipDrawableProgress.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
val progress = ld.findDrawableByLayerId(android.R.id.progress)
progress.setColorFilter(newColor, PorterDuff.Mode.SRC_IN)
val clipDrawableBackground = ld.findDrawableByLayerId(android.R.id.background)
clipDrawableBackground.setColorFilter(MaterialValueHelper.getPrimaryDisabledTextColor(progressSlider.context, ColorUtil.isColorLight(ThemeStore.primaryColor(progressSlider.context))), PorterDuff.Mode.SRC_IN)
val background = ld.findDrawableByLayerId(android.R.id.background)
background.setColorFilter(MaterialValueHelper.getPrimaryDisabledTextColor(progressSlider.context, ColorUtil.isColorLight(ThemeStore.primaryColor(progressSlider.context))), PorterDuff.Mode.SRC_IN)
val secondaryProgress = ld.findDrawableByLayerId(android.R.id.secondaryProgress)
secondaryProgress.setColorFilter(ColorUtil.withAlpha(newColor, 0.65f), PorterDuff.Mode.SRC_IN)
}
private fun createColorAnimator(target: Any, propertyName: String, @ColorInt startColor: Int, @ColorInt endColor: Int): Animator {

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

View File

@ -5,13 +5,21 @@
<solid android:color="@android:color/transparent" />
</shape>
</item>
<item android:id="@android:id/secondaryProgress">
<clip
android:clipOrientation="vertical"
android:gravity="bottom">
<shape>
<solid android:color="@color/md_red_400" />
</shape>
</clip>
</item>
<item android:id="@android:id/progress">
<clip
android:clipOrientation="vertical"
android:gravity="bottom">
<shape>
<solid
android:color="@color/md_deep_purple_A400" />
<solid android:color="@color/md_deep_purple_A400" />
</shape>
</clip>
</item>

View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?><!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="?colorPrimary" />
<item>
<bitmap
android:gravity="center"
android:src="@drawable/retro_icon" />
</item>
</layer-list>

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"
@ -60,6 +74,4 @@
<include layout="@layout/home_content" />
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>
</LinearLayout>

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<androidx.coordinatorlayout.widget.CoordinatorLayout 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"

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"
@ -56,5 +70,4 @@
<include layout="@layout/home_content" />
</androidx.core.widget.NestedScrollView>
</androidx.coordinatorlayout.widget.CoordinatorLayout>
</LinearLayout>
</LinearLayout>

View File

@ -1,4 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (c) 2019 Hemanth Savarala.
~
~ Licensed under the GNU General Public License v3
~
~ This is free software: you can redistribute it and/or modify it under
~ the terms of the GNU General Public License as published by
~ the Free Software Foundation either version 3 of the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
~ without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
~ See the GNU General Public License for more details.
-->
<LinearLayout 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"
@ -33,13 +47,13 @@
android:id="@+id/toolbarContainer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
app:cardCornerRadius="8dp"
app:cardElevation="0dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
app:strokeColor="?dividerColor"
app:cardUseCompatPadding="true"
app:layout_scrollFlags="scroll|enterAlways"
app:strokeColor="?dividerColor"
app:strokeWidth="1dp">
<FrameLayout
@ -49,9 +63,8 @@
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
style="@style/Toolbar"
app:title="@string/search_hint"
app:titleMarginStart="0dp"
app:titleTextAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:title="@string/library"
tools:ignore="UnusedAttribute" />
<ViewStub

View File

@ -28,6 +28,7 @@
android:layout_height="match_parent"
android:max="100"
android:progress="80"
android:secondaryProgress="100"
android:progressDrawable="@drawable/progress_drawable_vertical" />
<code.name.monkey.retromusic.views.FitSystemWindowsLayout

View File

@ -8,20 +8,6 @@ import android.os.Build
object VersionUtils {
/**
* @return true if device is running API >= 19
*/
fun hasKitKat(): Boolean {
return Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT
}
/**
* @return true if device is running API >= 20
*/
fun hasAndroidLPreview(): Boolean {
return Build.VERSION.SDK_INT >= 20
}
/**
* @return true if device is running API >= 21
*/