Skip to content

Commit

Permalink
feature: change UI travel card
Browse files Browse the repository at this point in the history
Modify font and exchange Title and Date in the card in the screen TravelList
  • Loading branch information
appellet committed Dec 11, 2024
1 parent e31af53 commit 09cd968
Showing 1 changed file with 16 additions and 13 deletions.
29 changes: 16 additions & 13 deletions app/src/main/java/com/github/se/travelpouch/ui/home/TravelList.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.automirrored.filled.KeyboardArrowRight
import androidx.compose.material.icons.automirrored.filled.Logout
import androidx.compose.material.icons.filled.Add
import androidx.compose.material.icons.filled.Adjust
import androidx.compose.material.icons.filled.Close
import androidx.compose.material.icons.filled.Menu
import androidx.compose.material.icons.filled.StopCircle
Expand Down Expand Up @@ -370,17 +371,17 @@ fun TravelItem(travelContainer: TravelContainer, onClick: () -> Unit) {
Row(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.SpaceBetween) {
Text(
text =
SimpleDateFormat("dd/MM/yyyy", Locale.getDefault())
.format(travelContainer.startTime.toDate()),
style = MaterialTheme.typography.bodySmall)
Text(
text = travelContainer.title,
style = MaterialTheme.typography.bodyMedium,
fontWeight = FontWeight.Bold)

Row(verticalAlignment = Alignment.CenterVertically) {
Text(
text = travelContainer.title,
style = MaterialTheme.typography.bodySmall,
fontWeight = FontWeight.Bold)
Text(
text =
SimpleDateFormat("dd/MM/yyyy", Locale.getDefault())
.format(travelContainer.startTime.toDate()),
style = MaterialTheme.typography.bodySmall)
Icon(
imageVector = Icons.AutoMirrored.Filled.KeyboardArrowRight,
contentDescription = null)
Expand All @@ -390,13 +391,15 @@ fun TravelItem(travelContainer: TravelContainer, onClick: () -> Unit) {
Spacer(modifier = Modifier.height(4.dp))

// Description
Text(text = travelContainer.description, style = MaterialTheme.typography.bodyMedium)
Text(text = travelContainer.description,
style = MaterialTheme.typography.bodySmall,
fontWeight = FontWeight.Normal)

// Location Name
Text(
text = travelContainer.location.name,
style = MaterialTheme.typography.bodySmall,
fontWeight = FontWeight.Light)
fontWeight = FontWeight.ExtraLight)
}
}
}
Expand Down Expand Up @@ -454,7 +457,7 @@ fun ResizableStowableMapWithGoogleMap(
clip = true
}
.height(latchDp)
.background(MaterialTheme.colorScheme.tertiary)
.background(MaterialTheme.colorScheme.errorContainer)
.draggable(
orientation = Orientation.Vertical,
state =
Expand All @@ -463,7 +466,7 @@ fun ResizableStowableMapWithGoogleMap(
delta, density, mapHeight, maxHeight, minHeight, belowThreshold)
})) {
Icon(
imageVector = Icons.Default.StopCircle,
imageVector = Icons.Default.Adjust,
contentDescription = "MapLatch",
modifier = Modifier.align(Alignment.Center))
}
Expand Down

0 comments on commit 09cd968

Please sign in to comment.