Added elevation to detail covers
Added some elevation to the images on the detail fragments.
This commit is contained in:
parent
1ae4d21b18
commit
9ab8b4e018
11 changed files with 18 additions and 7 deletions
|
@ -13,13 +13,16 @@ class AuxioApp : Application(), ImageLoaderFactory {
|
|||
super.onCreate()
|
||||
|
||||
// Init SettingsManager here so that there aren't any race conditions
|
||||
// [e,g Service starts/gets SettingsManager before activity can init SettingsManager]
|
||||
// [e.g Service gets SettingsManager before activity can init SettingsManager]
|
||||
val settingsManager = SettingsManager.init(applicationContext)
|
||||
|
||||
AppCompatDelegate.setDefaultNightMode(settingsManager.theme)
|
||||
}
|
||||
|
||||
override fun newImageLoader(): ImageLoader {
|
||||
// Don't cache images on-disk [The covers are already on-disk]
|
||||
// Crossfade by default
|
||||
// Use a transparent placeholder
|
||||
return ImageLoader.Builder(applicationContext)
|
||||
.diskCachePolicy(CachePolicy.DISABLED)
|
||||
.crossfade(true)
|
||||
|
|
|
@ -7,7 +7,6 @@ import android.view.View
|
|||
import android.view.WindowInsets
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.databinding.DataBindingUtil
|
||||
import coil.Coil
|
||||
import org.oxycblt.auxio.databinding.ActivityMainBinding
|
||||
import org.oxycblt.auxio.playback.PlaybackService
|
||||
import org.oxycblt.auxio.settings.SettingsManager
|
||||
|
|
|
@ -24,7 +24,6 @@ import org.oxycblt.auxio.ui.toColor
|
|||
|
||||
/**
|
||||
* The primary "Home" [Fragment] for Auxio.
|
||||
* TODO: Make navigation stack instead of artificially rerouting to LibraryFragment
|
||||
*/
|
||||
class MainFragment : Fragment() {
|
||||
private val playbackModel: PlaybackViewModel by activityViewModels()
|
||||
|
|
|
@ -198,8 +198,5 @@ fun ImageRequest.Builder.doCoverSetup(context: Context, data: BaseModel): ImageR
|
|||
* @return The base request
|
||||
*/
|
||||
private fun ImageView.getDefaultRequest(): ImageRequest.Builder {
|
||||
return ImageRequest.Builder(context)
|
||||
.crossfade(true)
|
||||
.placeholder(android.R.color.transparent)
|
||||
.target(this)
|
||||
return ImageRequest.Builder(context).target(this)
|
||||
}
|
||||
|
|
|
@ -111,6 +111,7 @@ class PlaybackFragment : Fragment(), SeekBar.OnSeekBarChangeListener {
|
|||
}
|
||||
}
|
||||
|
||||
// TODO: Add binding adapters for these
|
||||
playbackModel.isShuffling.observe(viewLifecycleOwner) {
|
||||
// Highlight the shuffle button if Playback is shuffled, and revert it if not.
|
||||
if (it) {
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
android:layout_height="@dimen/size_cover_mid_huge"
|
||||
android:layout_marginStart="@dimen/margin_medium"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
android:contentDescription="@{@string/description_album_cover(album.name)}"
|
||||
app:coverArt="@{album}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
android:layout_height="@dimen/size_cover_mid_huge"
|
||||
android:layout_margin="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:artistImage="@{artist}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
android:layout_height="@dimen/size_cover_mid_huge"
|
||||
android:layout_margin="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_genre_image(genre.name)}"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:genreImage="@{genre}"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
android:layout_height="@dimen/size_cover_huge"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_album_cover(album.name)}"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:coverArt="@{album}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -29,6 +29,8 @@
|
|||
android:layout_height="@dimen/size_cover_huge"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_artist_image(artist.name)}"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:artistImage="@{artist}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
|
@ -30,6 +30,8 @@
|
|||
android:layout_height="@dimen/size_cover_huge"
|
||||
android:layout_marginTop="@dimen/margin_medium"
|
||||
android:contentDescription="@{@string/description_genre_image(genre.name)}"
|
||||
android:outlineProvider="bounds"
|
||||
android:elevation="@dimen/elevation_normal"
|
||||
app:genreImage="@{genre}"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
|
|
Loading…
Reference in a new issue