Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix first selected #143

Merged
merged 3 commits into from
Jul 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="25dp"
android:height="24dp"
android:viewportWidth="25"
android:viewportHeight="24">
<group>
<clip-path
android:pathData="M0.8,0h24v24h-24z"/>
<path
android:pathData="M12.8,4C15.033,4 16.925,4.775 18.475,6.325C20.025,7.875 20.8,9.767 20.8,12C20.8,14.233 20.025,16.125 18.475,17.675C16.925,19.225 15.033,20 12.8,20C10.567,20 8.675,19.225 7.125,17.675C5.575,16.125 4.8,14.233 4.8,12C4.8,9.767 5.575,7.875 7.125,6.325C8.675,4.775 10.567,4 12.8,4ZM12.8,18C14.467,18 15.883,17.417 17.05,16.25C18.217,15.083 18.8,13.667 18.8,12C18.8,10.333 18.217,8.917 17.05,7.75C15.883,6.583 14.467,6 12.8,6C11.133,6 9.717,6.583 8.55,7.75C7.383,8.917 6.8,10.333 6.8,12C6.8,13.667 7.383,15.083 8.55,16.25C9.717,17.417 11.133,18 12.8,18ZM12.8,15.5C13.6,15.5 14.317,15.271 14.95,14.813C15.583,14.354 16.033,13.75 16.3,13H9.3C9.567,13.75 10.017,14.354 10.65,14.813C11.283,15.271 12,15.5 12.8,15.5ZM9.3,10C9.3,10.283 9.396,10.521 9.588,10.712C9.779,10.904 10.017,11 10.3,11C10.583,11 10.821,10.904 11.012,10.712C11.204,10.521 11.3,10.283 11.3,10C11.3,9.717 11.204,9.479 11.012,9.288C10.821,9.096 10.583,9 10.3,9C10.017,9 9.779,9.096 9.588,9.288C9.396,9.479 9.3,9.717 9.3,10ZM14.3,10C14.3,10.283 14.396,10.521 14.587,10.712C14.779,10.904 15.017,11 15.3,11C15.583,11 15.821,10.904 16.013,10.712C16.204,10.521 16.3,10.283 16.3,10C16.3,9.717 16.204,9.479 16.013,9.288C15.821,9.096 15.583,9 15.3,9C15.017,9 14.779,9.096 14.587,9.288C14.396,9.479 14.3,9.717 14.3,10ZM1.8,6V3C1.8,2.45 1.996,1.979 2.388,1.587C2.779,1.196 3.25,1 3.8,1H6.8V3H3.8V6H1.8ZM6.8,23H3.8C3.25,23 2.779,22.804 2.388,22.413C1.996,22.021 1.8,21.55 1.8,21V18H3.8V21H6.8V23ZM18.8,23V21H21.8V18H23.8V21C23.8,21.55 23.604,22.021 23.212,22.413C22.821,22.804 22.35,23 21.8,23H18.8ZM21.8,6V3H18.8V1H21.8C22.35,1 22.821,1.196 23.212,1.587C23.604,1.979 23.8,2.45 23.8,3V6H21.8Z"
android:fillColor="#C1C8C9"/>
</group>
</vector>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.Info
import androidx.compose.material.icons.outlined.CalendarMonth
import androidx.compose.material.icons.outlined.Favorite
import androidx.compose.material.icons.outlined.Info
Expand Down Expand Up @@ -126,42 +125,36 @@ sealed class IconRepresentation {

enum class MainScreenTab(
val icon: IconRepresentation.Vector,
val selectedIcon: IconRepresentation,
val label: String,
val contentDescription: String,
val testTag: String = "mainScreenTab:$label",
) {
Timetable(
icon = IconRepresentation.Vector(Icons.Outlined.CalendarMonth),
selectedIcon = IconRepresentation.Vector(Icons.Outlined.CalendarMonth),
label = MainStrings.Timetable.asString(),
contentDescription = MainStrings.Timetable.asString(),
),

EventMap(
icon = IconRepresentation.Vector(Icons.Outlined.Map),
selectedIcon = IconRepresentation.Vector(Icons.Outlined.Map),
label = MainStrings.EventMap.asString(),
contentDescription = MainStrings.EventMap.asString(),
),

Favorite(
icon = IconRepresentation.Vector(Icons.Outlined.Favorite),
selectedIcon = IconRepresentation.Vector(Icons.Outlined.Favorite),
label = MainStrings.EventMap.asString(),
contentDescription = MainStrings.EventMap.asString(),
),

About(
icon = IconRepresentation.Vector(Icons.Outlined.Info),
selectedIcon = IconRepresentation.Vector(Icons.Filled.Info),
label = MainStrings.About.asString(),
contentDescription = MainStrings.About.asString(),
),

ProfileCard(
icon = IconRepresentation.Vector(Icons.Outlined.People),
selectedIcon = IconRepresentation.Vector(Icons.Outlined.People),
label = MainStrings.ProfileCard.asString(),
contentDescription = MainStrings.ProfileCard.asString(),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ fun GlassLikeBottomNavigation(
onTabSelected: (MainScreenTab) -> Unit,
modifier: Modifier = Modifier,
) {
var selectedTabIndex by remember { mutableIntStateOf(1) }
var selectedTabIndex by remember { mutableIntStateOf(0) }
Box(
modifier = modifier
.padding(vertical = 24.dp, horizontal = 64.dp)
Expand Down
Loading