mirror of
https://github.com/bbara04/Purefin.git
synced 2026-03-31 17:10:08 +02:00
update Home screen item play button UI
- Replace `Button` with `IconButton` for the media play action in `HomeSections.kt`. - Style the play button with a circular background, custom sizing, and theme-specific colors. - Adjust layout positioning and padding for the play icon within the item card.
This commit is contained in:
@@ -14,15 +14,18 @@ import androidx.compose.foundation.layout.fillMaxSize
|
|||||||
import androidx.compose.foundation.layout.fillMaxWidth
|
import androidx.compose.foundation.layout.fillMaxWidth
|
||||||
import androidx.compose.foundation.layout.height
|
import androidx.compose.foundation.layout.height
|
||||||
import androidx.compose.foundation.layout.padding
|
import androidx.compose.foundation.layout.padding
|
||||||
|
import androidx.compose.foundation.layout.size
|
||||||
import androidx.compose.foundation.layout.width
|
import androidx.compose.foundation.layout.width
|
||||||
import androidx.compose.foundation.layout.wrapContentHeight
|
import androidx.compose.foundation.layout.wrapContentHeight
|
||||||
import androidx.compose.foundation.lazy.LazyRow
|
import androidx.compose.foundation.lazy.LazyRow
|
||||||
import androidx.compose.foundation.lazy.items
|
import androidx.compose.foundation.lazy.items
|
||||||
|
import androidx.compose.foundation.shape.CircleShape
|
||||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||||
import androidx.compose.material.icons.Icons
|
import androidx.compose.material.icons.Icons
|
||||||
import androidx.compose.material.icons.outlined.PlayArrow
|
import androidx.compose.material.icons.outlined.PlayArrow
|
||||||
import androidx.compose.material3.Button
|
|
||||||
import androidx.compose.material3.Icon
|
import androidx.compose.material3.Icon
|
||||||
|
import androidx.compose.material3.IconButton
|
||||||
|
import androidx.compose.material3.IconButtonColors
|
||||||
import androidx.compose.material3.MaterialTheme
|
import androidx.compose.material3.MaterialTheme
|
||||||
import androidx.compose.material3.Text
|
import androidx.compose.material3.Text
|
||||||
import androidx.compose.runtime.Composable
|
import androidx.compose.runtime.Composable
|
||||||
@@ -127,13 +130,29 @@ fun ContinueWatchingCard(
|
|||||||
.background(scheme.primary)
|
.background(scheme.primary)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
Button(
|
IconButton(
|
||||||
modifier = Modifier.align(Alignment.BottomEnd), onClick = {
|
modifier = Modifier.align(Alignment.BottomEnd)
|
||||||
|
.padding(end = 8.dp, bottom = 8.dp)
|
||||||
|
.clip(CircleShape)
|
||||||
|
.background(scheme.secondary)
|
||||||
|
.size(36.dp),
|
||||||
|
onClick = {
|
||||||
val intent = Intent(context, PlayerActivity::class.java)
|
val intent = Intent(context, PlayerActivity::class.java)
|
||||||
intent.putExtra("MEDIA_ID", item.id.toString())
|
intent.putExtra("MEDIA_ID", item.id.toString())
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
}) {
|
},
|
||||||
Icon(imageVector = Icons.Outlined.PlayArrow, contentDescription = "Play")
|
colors = IconButtonColors(
|
||||||
|
containerColor = scheme.secondary,
|
||||||
|
contentColor = scheme.onSecondary,
|
||||||
|
disabledContainerColor = scheme.secondary,
|
||||||
|
disabledContentColor = scheme.onSecondary
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
Icon(
|
||||||
|
imageVector = Icons.Outlined.PlayArrow,
|
||||||
|
contentDescription = "Play",
|
||||||
|
modifier = Modifier.size(28.dp),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Column(modifier = Modifier.padding(top = 12.dp)) {
|
Column(modifier = Modifier.padding(top = 12.dp)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user