Skip to content

Commit

Permalink
ui: Added landscape layout
Browse files Browse the repository at this point in the history
feat: Added seek to previous to next song

Signed-off-by: Gabriel Fontán <[email protected]>
  • Loading branch information
BobbyESP committed May 1, 2024
1 parent 71002ad commit e1c50a0
Show file tree
Hide file tree
Showing 7 changed files with 209 additions and 80 deletions.
5 changes: 2 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,8 @@ dependencies {
//-------------------Image Loading-------------------//
implementation(libs.landscapist.coil)
implementation(libs.coil)
implementation(
libs.compose.coil
)
implementation(libs.compose.coil)

//-------------------FIREBASE-------------------//
"playstoreImplementation"(platform(libs.firebase.bom))
"playstoreImplementation"(libs.firebase.analytics)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import android.content.Context
import android.graphics.Bitmap
import android.graphics.drawable.BitmapDrawable
import androidx.compose.foundation.Image
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Box
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.rounded.MusicNote
import androidx.compose.material3.MaterialTheme
Expand Down Expand Up @@ -119,9 +119,8 @@ fun AsyncImageImpl(
alignment = alignment,
contentScale = contentScale,
alpha = alpha,
colorFilter = colorFilter,

)
colorFilter = colorFilter
)
}

@Composable
Expand All @@ -132,8 +131,9 @@ fun ArtworkAsyncImage(
var showArtwork by remember { mutableStateOf(true) }

if (artworkPath != null && showArtwork) {
Column(
modifier = modifier
Box(
modifier = modifier,
contentAlignment = Alignment.Center,
) {
AsyncImageImpl(
modifier = modifier
Expand All @@ -155,7 +155,7 @@ fun ArtworkAsyncImage(
.clip(MaterialTheme.shapes.small),
icon = Icons.Rounded.MusicNote,
colorful = false,
contentDescription = "Song cover"
contentDescription = "Song cover placeholder"
)
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
package com.bobbyesp.metadator.presentation.components.others

import androidx.compose.animation.core.Spring
import androidx.compose.animation.core.spring
import androidx.compose.animation.ContentTransform
import androidx.compose.animation.SizeTransform
import androidx.compose.animation.core.AnimationSpec
import androidx.compose.animation.core.EaseInOutSine
import androidx.compose.animation.core.tween
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
import com.bobbyesp.ui.motion.materialSharedAxisXIn
import com.bobbyesp.ui.motion.materialSharedAxisXOut

val CollapsedPlayerHeight = 90.dp
val SeekToButtonSize = 42.dp

val PlayerAnimationSpec = spring<Dp>(stiffness = Spring.StiffnessMediumLow)
val PlayerAnimationSpec: AnimationSpec<Dp> = tween(
durationMillis = 750,
delayMillis = 0,
easing = EaseInOutSine
)

val AnimatedTextContentTransformation = ContentTransform(
materialSharedAxisXIn(initialOffsetX = { it / 10 }),
materialSharedAxisXOut(targetOffsetX = { -it / 10 }),
sizeTransform = SizeTransform(clip = false)
)
Loading

0 comments on commit e1c50a0

Please sign in to comment.