Skip to content

Commit

Permalink
-Shorts Video Player Enhancement Impl (#173)
Browse files Browse the repository at this point in the history
  • Loading branch information
KhubaibKhan4 committed Mar 17, 2024
1 parent 437ea74 commit d397bf7
Showing 1 changed file with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import androidx.compose.foundation.layout.FlowRow
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.offset
Expand Down Expand Up @@ -107,7 +108,11 @@ import org.koin.compose.koinInject

@Composable
fun ShortList(youtube: Youtube) {
LazyColumn {
LazyColumn(
modifier = Modifier.fillMaxWidth(),
verticalArrangement = Arrangement.Center,
horizontalAlignment = Alignment.CenterHorizontally
) {
youtube.items?.let { videos ->
items(videos) { items ->
ShortItem(items)
Expand Down Expand Up @@ -174,9 +179,10 @@ fun ShortItem(
}
}
Box(
modifier = Modifier.fillMaxWidth().background(color = Color.Black)
modifier = Modifier.fillMaxSize()
.background(color = Color.Black)
.padding(top = 10.dp),
contentAlignment = Alignment.Center
contentAlignment = Alignment.TopCenter
) {
ShortsVideoPlayer(url = shortsUrl)
Napier.d(message = "Video ID: ${video.id}", tag = "SHORTS")
Expand Down Expand Up @@ -544,7 +550,7 @@ fun ShortItem(
) {
androidx.compose.material3.Text(
text = title,
color = if (selectedButton == title) if(isDark) Color.White else Color.White else if(isDark) Color.White else Color.Black
color = if (selectedButton == title) if (isDark) Color.White else Color.White else if (isDark) Color.White else Color.Black
)
Spacer(modifier = Modifier.width(6.dp))
}
Expand Down Expand Up @@ -1034,4 +1040,4 @@ fun ShortItem(
}
}
}
}
}

0 comments on commit d397bf7

Please sign in to comment.