diff --git a/app/build.gradle b/app/build.gradle index 100c3f00..948aa127 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -58,7 +58,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.33.41' + implementation 'com.simplemobiletools:commons:5.33.44' implementation 'org.greenrobot:eventbus:3.2.0' implementation 'androidx.media:media:1.2.1' implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0' diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt index 174b6617..c376b752 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/MainActivity.kt @@ -319,13 +319,13 @@ class MainActivity : SimpleActivity() { private fun startSleepTimer() { checkSleepTimerPosition() - sleep_timer_holder.beVisible() + sleep_timer_holder.fadeIn() sendIntent(START_SLEEP_TIMER) } private fun stopSleepTimer() { sendIntent(STOP_SLEEP_TIMER) - sleep_timer_holder.beGone() + sleep_timer_holder.fadeOut() } private fun checkSleepTimerPosition() { diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt index 9b65fcbb..70d0992c 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/activities/TrackActivity.kt @@ -25,6 +25,7 @@ import com.bumptech.glide.request.target.Target import com.google.gson.Gson import com.google.gson.reflect.TypeToken import com.simplemobiletools.commons.extensions.* +import com.simplemobiletools.commons.helpers.MEDIUM_ALPHA import com.simplemobiletools.commons.helpers.ensureBackgroundThread import com.simplemobiletools.musicplayer.R import com.simplemobiletools.musicplayer.extensions.config @@ -262,7 +263,7 @@ class TrackActivity : SimpleActivity() { val isShuffleEnabled = config.isShuffleEnabled activity_track_toggle_shuffle.apply { applyColorFilter(if (isShuffleEnabled) getAdjustedPrimaryColor() else config.textColor) - alpha = if (isShuffleEnabled) 1f else LOWER_ALPHA + alpha = if (isShuffleEnabled) 1f else MEDIUM_ALPHA contentDescription = getString(if (isShuffleEnabled) R.string.disable_shuffle else R.string.enable_shuffle) } } @@ -278,7 +279,7 @@ class TrackActivity : SimpleActivity() { val repeatTrack = config.repeatTrack activity_track_repeat.apply { applyColorFilter(if (repeatTrack) getAdjustedPrimaryColor() else config.textColor) - alpha = if (repeatTrack) 1f else LOWER_ALPHA + alpha = if (repeatTrack) 1f else MEDIUM_ALPHA contentDescription = getString(if (repeatTrack) R.string.disable_song_repetition else R.string.enable_song_repetition) } } diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt index b8b71de8..801315c7 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/helpers/Constants.kt @@ -59,8 +59,6 @@ const val SLEEP_IN_TS = "sleep_in_ts" const val EQUALIZER_PRESET = "EQUALIZER_PRESET" const val EQUALIZER_BANDS = "EQUALIZER_BANDS" -const val LOWER_ALPHA = 0.5f - const val SHOW_FILENAME_NEVER = 1 const val SHOW_FILENAME_IF_UNAVAILABLE = 2 const val SHOW_FILENAME_ALWAYS = 3 diff --git a/app/src/main/kotlin/com/simplemobiletools/musicplayer/views/CurrentTrackBar.kt b/app/src/main/kotlin/com/simplemobiletools/musicplayer/views/CurrentTrackBar.kt index de4b2bce..86e8b2f4 100644 --- a/app/src/main/kotlin/com/simplemobiletools/musicplayer/views/CurrentTrackBar.kt +++ b/app/src/main/kotlin/com/simplemobiletools/musicplayer/views/CurrentTrackBar.kt @@ -9,9 +9,7 @@ import com.bumptech.glide.Glide import com.bumptech.glide.load.resource.bitmap.CenterCrop import com.bumptech.glide.load.resource.bitmap.RoundedCorners import com.bumptech.glide.request.RequestOptions -import com.simplemobiletools.commons.extensions.beGone -import com.simplemobiletools.commons.extensions.beVisible -import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor +import com.simplemobiletools.commons.extensions.* import com.simplemobiletools.musicplayer.R import com.simplemobiletools.musicplayer.extensions.config import com.simplemobiletools.musicplayer.extensions.sendIntent @@ -30,10 +28,10 @@ class CurrentTrackBar(context: Context, attributeSet: AttributeSet) : RelativeLa fun updateCurrentTrack(track: Track?) { if (track == null) { - beGone() + fadeOut() return } else { - beVisible() + fadeIn() } val artist = if (track.artist.trim().isNotEmpty() && track.artist != MediaStore.UNKNOWN_STRING) {