diff --git a/app/build.gradle b/app/build.gradle index a9bf947e..2de3233e 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -13,8 +13,8 @@ android { vectorDrawables.useSupportLibrary = true applicationId "code.name.monkey.retromusic" - versionCode 371 - versionName '3.4.000-beta-final' + versionCode 372 + versionName '3.4.000' multiDexEnabled true @@ -67,7 +67,7 @@ android { sourceCompatibility '1.8' targetCompatibility '1.8' } - buildToolsVersion = '29.0.1' + buildToolsVersion = '29.0.2' configurations.all { resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9' @@ -102,7 +102,7 @@ dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation 'androidx.multidex:multidex:2.0.1' - implementation 'androidx.fragment:fragment:1.2.0-alpha03' + implementation 'androidx.fragment:fragment:1.2.0-alpha04' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0-beta04' implementation "androidx.gridlayout:gridlayout:1.0.0" diff --git a/app/src/main/assets/retro-changelog.html b/app/src/main/assets/retro-changelog.html index ce8cd164..a4346a45 100644 --- a/app/src/main/assets/retro-changelog.html +++ b/app/src/main/assets/retro-changelog.html @@ -1 +1 @@ -
If you see entire app white or dark or black select same theme in settings to fix
*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.
\ No newline at end of file +If you see entire app white or dark or black select same theme in settings to fix
*If you face any UI related issues you clear app data and cache, if its not working try to uninstall and install again.
\ No newline at end of file diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/AboutActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/AboutActivity.kt index a699ab38..30c983ab 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/AboutActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/AboutActivity.kt @@ -9,8 +9,6 @@ import android.view.View import androidx.core.app.ShareCompat import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.LinearLayoutManager -import code.name.monkey.appthemehelper.ThemeStore -import code.name.monkey.appthemehelper.util.ToolbarContentTintHelper import code.name.monkey.retromusic.Constants.APP_INSTAGRAM_LINK import code.name.monkey.retromusic.Constants.APP_TELEGRAM_LINK import code.name.monkey.retromusic.Constants.APP_TWITTER_LINK @@ -60,16 +58,13 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_about) - setStatusbarColorAuto() setNavigationbarColorAuto() setLightNavigationBar(true) loadContributors() - setUpToolbar() - + setSupportActionBar(toolbar) appVersion.text = getAppVersion() - setUpView() } @@ -83,10 +78,9 @@ class AboutActivity : AbsBaseActivity(), View.OnClickListener { } private fun setUpToolbar() { - appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) - toolbar.setBackgroundColor(ThemeStore.primaryColor(this)) - setSupportActionBar(toolbar) - ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this)) + //appBarLayout.setBackgroundColor(ThemeStore.primaryColor(this)) + //toolbar.setBackgroundColor(ThemeStore.primaryColor(this)) + //ToolbarContentTintHelper.colorBackButton(toolbar, ThemeStore.textColorSecondary(this)) } private fun openUrl(url: String) { diff --git a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt index d559704d..dd5c0b5b 100644 --- a/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt +++ b/app/src/main/java/code/name/monkey/retromusic/activities/AlbumDetailsActivity.kt @@ -9,7 +9,6 @@ import android.transition.Slide import android.view.* import android.view.animation.AnimationUtils import android.widget.ImageView -import androidx.core.app.ActivityCompat import androidx.recyclerview.widget.DefaultItemAnimator import androidx.recyclerview.widget.GridLayoutManager import androidx.recyclerview.widget.LinearLayoutManager @@ -85,7 +84,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { contentContainer?.setCardBackgroundColor(ColorStateList.valueOf(ThemeStore.primaryColor(this))) - ActivityCompat.postponeEnterTransition(this) + postponeEnterTransition() artistImage = findViewById(R.id.artistImage) @@ -169,7 +168,7 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { } override fun complete() { - ActivityCompat.startPostponedEnterTransition(this) + scheduleStartPostponedTransition(image) } override fun album(album: Album) { @@ -224,6 +223,16 @@ class AlbumDetailsActivity : AbsSlidingMusicPanelActivity(), AlbumDetailsView { }) } + private fun scheduleStartPostponedTransition(image: ImageView) { + image.viewTreeObserver.addOnPreDrawListener(object : ViewTreeObserver.OnPreDrawListener { + override fun onPreDraw(): Boolean { + image.viewTreeObserver.removeOnPreDrawListener(this) + startPostponedEnterTransition(); + return true; + } + }) + } + private fun setColors(color: Int) { val themeColor = if (PreferenceUtil.getInstance(this).adaptiveColor) color else ThemeStore.accentColor(this) diff --git a/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt b/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt index f079a9ea..b58eeab4 100644 --- a/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/adapter/song/SongAdapter.kt @@ -78,28 +78,18 @@ open class SongAdapter @JvmOverloads constructor( override fun onBindViewHolder(holder: ViewHolder, position: Int) { val song = dataSet[position] - val isChecked = isChecked(song) holder.itemView.isActivated = isChecked - - if (holder.title != null) { - holder.title!!.text = getSongTitle(song) - } - if (holder.text != null) { - holder.text!!.text = getSongText(song) - } + holder.title?.text = getSongTitle(song) + holder.text?.text = getSongText(song) loadAlbumCover(song, holder) } private fun setColors(color: Int, holder: ViewHolder) { if (holder.paletteColorContainer != null) { - holder.paletteColorContainer!!.setBackgroundColor(color) - if (holder.title != null) { - holder.title!!.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color))) - } - if (holder.text != null) { - holder.text!!.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color))) - } + holder.paletteColorContainer?.setBackgroundColor(color) + holder.title?.setTextColor(MaterialValueHelper.getPrimaryTextColor(activity, ColorUtil.isColorLight(color))) + holder.text?.setTextColor(MaterialValueHelper.getSecondaryTextColor(activity, ColorUtil.isColorLight(color))) } } diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt index 0bd4ef02..9c84f752 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/MiniPlayerFragment.kt @@ -10,11 +10,9 @@ import android.text.SpannableStringBuilder import android.text.style.ForegroundColorSpan import android.view.* import android.view.animation.DecelerateInterpolator -import android.widget.Toast import code.name.monkey.appthemehelper.ThemeStore import code.name.monkey.retromusic.R import code.name.monkey.retromusic.fragments.base.AbsMusicServiceFragment -import code.name.monkey.retromusic.fragments.player.PlayerAlbumCoverFragment import code.name.monkey.retromusic.helper.MusicPlayerRemote import code.name.monkey.retromusic.helper.MusicProgressViewUpdateHelper import code.name.monkey.retromusic.helper.PlayPauseButtonOnClickHandler @@ -46,8 +44,6 @@ open class MiniPlayerFragment : AbsMusicServiceFragment(), MusicProgressViewUpda override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) - - view.setBackgroundColor(ThemeStore.primaryColor(requireContext())) view.setOnTouchListener(FlingPlayBackController(requireContext())) //view.setOnClickListener(v -> NavigationUtil.gotoNowPlayingActivity(getContext())); setUpMiniPlayer() diff --git a/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java b/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java index 603a632e..fb2f27dc 100644 --- a/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java +++ b/app/src/main/java/code/name/monkey/retromusic/fragments/mainactivity/LibraryFragment.java @@ -30,8 +30,6 @@ import java.util.Objects; import code.name.monkey.appthemehelper.ThemeStore; import code.name.monkey.appthemehelper.common.ATHToolbarActivity; -import code.name.monkey.appthemehelper.util.ATHUtil; -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.dialogs.CreatePlaylistDialog; @@ -54,7 +52,6 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde private Toolbar toolbar; private AppBarLayout appBarLayout; - private View contentContainer; private MaterialCardView toolbarContainer; private MaterialCab cab; @@ -89,9 +86,8 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde @Nullable Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_library, container, false); disposable = new CompositeDisposable(); - contentContainer = view.findViewById(R.id.fragmentContainer); - toolbarContainer = view.findViewById(R.id.toolbarContainer); appBarLayout = view.findViewById(R.id.appBarLayout); + toolbarContainer = view.findViewById(R.id.toolbarContainer); toolbar = view.findViewById(R.id.toolbar); PreferenceUtil.getInstance(requireActivity()).registerOnSharedPreferenceChangedListener(this); return view; @@ -149,17 +145,15 @@ public class LibraryFragment extends AbsMainActivityFragment implements CabHolde @SuppressWarnings("ConstantConditions") private void setupToolbar() { - int primaryColor = ThemeStore.Companion.primaryColor(getContext()); - TintHelper.setTintAuto(contentContainer, primaryColor, true); - appBarLayout.setBackgroundColor(primaryColor); - toolbar.setBackgroundColor(RetroColorUtil.toolbarColor(getMainActivity())); + //int primaryColor = ThemeStore.Companion.primaryColor(getContext()); + //TintHelper.setTintAuto(contentContainer, primaryColor, true); + //appBarLayout.setBackgroundColor(primaryColor); + //toolbar.setBackgroundColor(RetroColorUtil.toolbarColor(getMainActivity())); toolbar.setNavigationIcon(R.drawable.ic_menu_white_24dp); toolbar.setOnClickListener(v -> { ActivityOptions options = ActivityOptions.makeSceneTransitionAnimation(getMainActivity(), toolbarContainer, getString(R.string.transition_toolbar)); NavigationUtil.goToSearch(getMainActivity(), options); }); - appBarLayout.addOnOffsetChangedListener((appBarLayout, verticalOffset) -> - getMainActivity().setLightStatusbar(!ATHUtil.INSTANCE.isWindowBackgroundDark(getContext()))); getMainActivity().setSupportActionBar(toolbar); toolbar.setNavigationOnClickListener(v -> showMainMenu(OptionsSheetDialogFragment.LIBRARY)); } diff --git a/app/src/main/java/code/name/monkey/retromusic/glide/artistimage/ArtistImageLoader.kt b/app/src/main/java/code/name/monkey/retromusic/glide/artistimage/ArtistImageLoader.kt index cbd4c1c7..40e21d8d 100644 --- a/app/src/main/java/code/name/monkey/retromusic/glide/artistimage/ArtistImageLoader.kt +++ b/app/src/main/java/code/name/monkey/retromusic/glide/artistimage/ArtistImageLoader.kt @@ -64,6 +64,7 @@ class ArtistImageFetcher( } catch (ignore: IOException) { // can't do much about it } + } } diff --git a/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt b/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt index 763aeafb..9457b36a 100644 --- a/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt +++ b/app/src/main/java/code/name/monkey/retromusic/mvp/presenter/HomePresenter.kt @@ -20,15 +20,11 @@ import code.name.monkey.retromusic.adapter.HomeAdapter.Companion.RECENT_ALBUMS import code.name.monkey.retromusic.adapter.HomeAdapter.Companion.RECENT_ARTISTS import code.name.monkey.retromusic.adapter.HomeAdapter.Companion.TOP_ALBUMS import code.name.monkey.retromusic.adapter.HomeAdapter.Companion.TOP_ARTISTS -import code.name.monkey.retromusic.model.Album -import code.name.monkey.retromusic.model.Artist import code.name.monkey.retromusic.model.Home -import code.name.monkey.retromusic.model.Playlist import code.name.monkey.retromusic.mvp.BaseView import code.name.monkey.retromusic.mvp.Presenter import code.name.monkey.retromusic.mvp.PresenterImpl import code.name.monkey.retromusic.providers.interfaces.Repository -import io.reactivex.Observable import io.reactivex.disposables.CompositeDisposable import io.reactivex.disposables.Disposable import javax.inject.Inject @@ -44,16 +40,20 @@ interface HomeView : BaseView { interface HomePresenter : Presenter- * To achieve this we expose a {@code lineHeightHint} allowing you to specify the desired line - * height (alternatively a {@code lineHeightMultiplierHint} to use a multiplier of the text size). - * This line height will be adjusted to be a multiple of 4dp to ensure that baselines sit on - * the grid. - *
- * We also adjust spacing above and below the text to ensure that the first line's baseline sits on
- * the grid (relative to the view's top) & that this view's height is a multiple of 4dp so that
- * subsequent views start on the grid.
- */
public class BaselineGridTextView extends MaterialTextView {
private final float FOUR_DIP;
diff --git a/app/src/main/java/code/name/monkey/retromusic/views/WidthFitSquareCardView.kt b/app/src/main/java/code/name/monkey/retromusic/views/WidthFitSquareCardView.kt
index 6aaabe73..ba87f865 100644
--- a/app/src/main/java/code/name/monkey/retromusic/views/WidthFitSquareCardView.kt
+++ b/app/src/main/java/code/name/monkey/retromusic/views/WidthFitSquareCardView.kt
@@ -35,11 +35,11 @@ class WidthFitSquareCardView : MaterialCardView {
}
override fun onMeasure(i: Int, i2: Int) {
- var i2 = i2
+ var width = i2
if (this.forceSquare) {
- i2 = i
+ width = i
}
- super.onMeasure(i, i2)
+ super.onMeasure(i, width)
}
private var forceSquare = true
diff --git a/app/src/main/res/layout-xlarge/abs_playlists.xml b/app/src/main/res/layout-xlarge/abs_playlists.xml
index e0e25cd8..b3a448f4 100644
--- a/app/src/main/res/layout-xlarge/abs_playlists.xml
+++ b/app/src/main/res/layout-xlarge/abs_playlists.xml
@@ -28,20 +28,21 @@
android:paddingStart="16dp"
android:paddingEnd="0dp">
-