-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from TimerTiTi/126-release-103
release-1.0.3
- Loading branch information
Showing
90 changed files
with
2,367 additions
and
1,044 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
78 changes: 78 additions & 0 deletions
78
...ystem/src/main/kotlin/com/titi/app/core/designsystem/navigation/TdsBottomNavigationBar.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
package com.titi.app.core.designsystem.navigation | ||
|
||
import androidx.compose.foundation.background | ||
import androidx.compose.foundation.layout.Arrangement | ||
import androidx.compose.foundation.layout.ExperimentalLayoutApi | ||
import androidx.compose.foundation.layout.Row | ||
import androidx.compose.foundation.layout.WindowInsets | ||
import androidx.compose.foundation.layout.WindowInsetsSides | ||
import androidx.compose.foundation.layout.fillMaxWidth | ||
import androidx.compose.foundation.layout.only | ||
import androidx.compose.foundation.layout.systemBarsIgnoringVisibility | ||
import androidx.compose.foundation.layout.windowInsetsPadding | ||
import androidx.compose.foundation.layout.wrapContentHeight | ||
import androidx.compose.foundation.selection.selectableGroup | ||
import androidx.compose.material3.Icon | ||
import androidx.compose.runtime.Composable | ||
import androidx.compose.ui.Modifier | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.res.painterResource | ||
import androidx.compose.ui.res.stringResource | ||
import androidx.compose.ui.unit.dp | ||
import androidx.compose.ui.unit.sp | ||
import com.titi.app.core.designsystem.component.TdsText | ||
import com.titi.app.core.designsystem.theme.TdsColor | ||
import com.titi.app.core.designsystem.theme.TdsTextStyle | ||
|
||
@OptIn(ExperimentalLayoutApi::class) | ||
@Composable | ||
fun TdsBottomNavigationBar( | ||
currentTopLevelDestination: TopLevelDestination, | ||
bottomNavigationColor: Long, | ||
onNavigateToDestination: (TopLevelDestination) -> Unit, | ||
) { | ||
Row( | ||
modifier = Modifier | ||
.fillMaxWidth() | ||
.wrapContentHeight() | ||
.windowInsetsPadding( | ||
WindowInsets.systemBarsIgnoringVisibility.only( | ||
WindowInsetsSides.Bottom + WindowInsetsSides.Horizontal, | ||
), | ||
) | ||
.selectableGroup() | ||
.background(Color(bottomNavigationColor)), | ||
horizontalArrangement = Arrangement.spacedBy(8.dp), | ||
) { | ||
TopLevelDestination.entries.forEach { destination -> | ||
val selected = currentTopLevelDestination == destination | ||
TdsBottomNavigationBarItem( | ||
selected = selected, | ||
onClick = { onNavigateToDestination(destination) }, | ||
icon = { | ||
Icon( | ||
painter = painterResource(id = destination.iconResourceId), | ||
contentDescription = stringResource(id = destination.titleTextId), | ||
tint = if (selected) { | ||
TdsColor.TEXT.getColor() | ||
} else { | ||
TdsColor.LIGHT_GRAY.getColor() | ||
}, | ||
) | ||
}, | ||
label = { | ||
TdsText( | ||
text = stringResource(id = destination.titleTextId), | ||
textStyle = TdsTextStyle.SEMI_BOLD_TEXT_STYLE, | ||
fontSize = 16.sp, | ||
color = if (selected) { | ||
TdsColor.TEXT.getColor() | ||
} else { | ||
TdsColor.LIGHT_GRAY.getColor() | ||
}, | ||
) | ||
}, | ||
) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 0 additions & 13 deletions
13
core/designsystem/src/main/res/drawable/add_record_icon.xml
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
core/designsystem/src/main/res/drawable/edit_record_icon.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="30dp" | ||
android:height="34dp" | ||
android:viewportWidth="30" | ||
android:viewportHeight="34"> | ||
<path | ||
android:pathData="M21,27.59H9C8.503,27.59 8.1,27.187 8.1,26.69V23.69C8.1,23.451 8.195,23.222 8.364,23.053L16.515,14.902L16.52,14.897L16.535,14.882C16.667,14.75 16.801,14.616 16.925,14.51C17.063,14.393 17.247,14.26 17.49,14.181C17.822,14.073 18.178,14.073 18.51,14.181C18.753,14.26 18.937,14.393 19.075,14.51C19.199,14.615 19.333,14.749 19.464,14.881L20.807,16.223C20.939,16.355 21.073,16.49 21.179,16.614C21.296,16.752 21.43,16.936 21.509,17.18C21.616,17.511 21.616,17.868 21.509,18.199C21.43,18.443 21.296,18.627 21.179,18.765C21.073,18.889 20.939,19.023 20.807,19.155L14.173,25.789H21C21.497,25.789 21.9,26.192 21.9,26.69C21.9,27.187 21.497,27.59 21,27.59ZM17.976,15.988L18,15.965L18.024,15.988C18.076,16.038 18.135,16.097 18.21,16.173L19.515,17.477C19.591,17.553 19.65,17.613 19.701,17.665L19.725,17.69L19.701,17.714C19.653,17.764 19.595,17.821 19.523,17.893L19.516,17.901L18,19.417L16.273,17.69L17.785,16.178L17.788,16.174L17.789,16.173C17.865,16.098 17.924,16.038 17.976,15.988ZM15,18.962L16.727,20.69L11.627,25.789L9.9,25.789V24.062L15,18.962Z" | ||
android:fillColor="#3F405F" | ||
android:fillType="evenOdd"/> | ||
<path | ||
android:pathData="M9,1C9,0.448 8.552,0 8,0C7.448,0 7,0.448 7,1V3.5L6.558,3.5C5.614,3.5 4.844,3.5 4.22,3.551C3.574,3.604 2.996,3.716 2.457,3.99C1.61,4.422 0.922,5.11 0.49,5.957C0.216,6.496 0.104,7.074 0.051,7.72C-0,8.344 -0,9.114 0,10.058V26.942C-0,27.887 -0,28.656 0.051,29.28C0.104,29.926 0.216,30.504 0.49,31.043C0.922,31.889 1.609,32.578 2.457,33.01C2.995,33.284 3.573,33.396 4.218,33.449C4.842,33.5 5.61,33.5 6.552,33.5H23.448C24.39,33.5 25.158,33.5 25.781,33.449C26.426,33.396 27.004,33.284 27.542,33.01C28.388,32.579 29.078,31.89 29.51,31.043C29.784,30.504 29.896,29.927 29.949,29.282C30,28.659 30,27.891 30,26.948V10.052C30,9.11 30,8.342 29.949,7.718C29.896,7.073 29.784,6.495 29.51,5.957C29.078,5.109 28.388,4.421 27.542,3.99C27.003,3.716 26.425,3.604 25.78,3.551C25.156,3.5 24.387,3.5 23.442,3.5L23,3.5V1C23,0.448 22.552,0 22,0C21.448,0 21,0.448 21,1V3.5H9V1ZM2,12.5H28V26.906C28,27.901 27.999,28.587 27.956,29.119C27.913,29.64 27.835,29.925 27.728,30.135C27.489,30.605 27.105,30.988 26.634,31.228C26.424,31.335 26.139,31.413 25.618,31.456C25.086,31.499 24.4,31.5 23.405,31.5H6.595C5.6,31.5 4.914,31.499 4.381,31.456C3.86,31.413 3.574,31.335 3.365,31.228C2.895,30.989 2.512,30.606 2.272,30.135C2.166,29.925 2.087,29.639 2.044,29.117C2.001,28.584 2,27.897 2,26.9V12.5Z" | ||
android:fillColor="#3F405F" | ||
android:fillType="evenOdd"/> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.