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

Master #5

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift click to select a range
0d710f8
places api restricted to ar results, some inf added to tripitem
cristiangranero90 Jul 4, 2023
60e25d0
Sdk updated to v34. M3alpha03
cristiangranero90 Jul 4, 2023
3783836
Fixed Tripscreen. New strings added for many languages
cristiangranero90 Nov 23, 2023
beed9b8
Build gradle updated. Navigation compose, compose material, play serv…
cristiangranero90 Nov 23, 2023
567fed5
Gradle updated. Maps compose downgrade (animations conflict)
cristiangranero90 Jan 10, 2024
221348d
Fixed dates UTC to system default
cristiangranero90 Jan 11, 2024
0f61054
All dates to UTC
cristiangranero90 Jan 12, 2024
e5a21f9
All dates to UTC
cristiangranero90 Jan 15, 2024
197076d
Top and Bottom bar added to a navigation compose
cristiangranero90 Jan 15, 2024
1233bba
Destinations from Navigation Compose updated
cristiangranero90 Jan 15, 2024
4fb54c1
Destinations from Navigation Compose updated
cristiangranero90 Jan 15, 2024
3b72a72
Fixed Dates and Times in TripScreen, TripCard && Preference screen
cristiangranero90 Jan 16, 2024
443b6df
OSMDroid Added to the root of project
cristiangranero90 Jan 17, 2024
7fffa23
Login Screen addded, Email Password request
cristiangranero90 Jan 19, 2024
1223294
Google SignIn method added
cristiangranero90 Jan 23, 2024
4f8a4a0
Profile Image taken from source
cristiangranero90 Jan 23, 2024
f8206e5
Launch icons added. SignOut from profile image is working
cristiangranero90 Jan 23, 2024
c1b163c
Material theme 3 updated - Build gradle
cristiangranero90 Jan 23, 2024
91508b5
Close session fixed, now is working fine
cristiangranero90 Jan 24, 2024
3ab561e
Back handler added
cristiangranero90 Jan 24, 2024
2103363
Back handler added
cristiangranero90 Jan 24, 2024
831fa4a
"Always logout" is not available now
cristiangranero90 Jan 24, 2024
fec0793
Drop down menu colors fixed
cristiangranero90 Jan 24, 2024
7251b3f
Logout string resources added to the project
cristiangranero90 Jan 24, 2024
9e88636
Apple icon button added
cristiangranero90 Jan 24, 2024
ab90913
Forgot password dialog fixed
cristiangranero90 Jan 24, 2024
3502af7
Password visibility added
cristiangranero90 Jan 24, 2024
072b3d3
Register dialog now is working. Can add new people to the app
cristiangranero90 Jan 25, 2024
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
Prev Previous commit
Next Next commit
Destinations from Navigation Compose updated
  • Loading branch information
cristiangranero90 committed Jan 15, 2024
commit 1233bbaa1bc24b1486ad92501c79017d54e1e606
16 changes: 16 additions & 0 deletions app/src/main/java/com/juntas/juntas_app/home_screen/HomeScreen.kt
Original file line number Diff line number Diff line change
@@ -0,0 1,16 @@
package com.juntas.juntas_app.home_screen

import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier

@Composable
fun HomeScreen(){
Box(
modifier = Modifier.fillMaxSize()
) {
Text(text = "Home")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 14,16 @@ import androidx.compose.ui.res.painterResource
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import androidx.navigation.NavDestination
import androidx.navigation.NavDestination.Companion.hierarchy
import com.juntas.juntas_app.R

@Composable
fun BottomBar(
currentDestination: NavDestination?,
onHomeClicked: () -> Unit,
onPassengerClicked: () -> Unit,
onDriverClicked: () -> Unit,
modifier: Modifier = Modifier,
) {
val iconsColor = MaterialTheme.colorScheme.onSurface
Expand All @@ -27,21 33,22 @@ fun BottomBar(
containerColor = MaterialTheme.colorScheme.background,
tonalElevation = 1.dp
) {
NavigationBarItem(
selected = currentDestination?.hierarchy?.any { it.route == "home_screen" } == true,
onClick = { onHomeClicked() },
icon = {
Icon(
imageVector = Icons.Default.Home,
contentDescription = stringResource(R.string.go_to_home),
tint = iconsColor
)},
alwaysShowLabel = true,
label = { Text(text = stringResource(R.string.home))}
)

NavigationBarItem(
selected = true,
onClick = { /*TODO*/ },
icon = {
Icon(
imageVector = Icons.Default.Home,
contentDescription = stringResource(R.string.go_to_home),
tint = iconsColor
)},
alwaysShowLabel = true,
label = { Text(text = stringResource(R.string.home))}
)
NavigationBarItem(
selected = false,
onClick = { /*TODO*/ },
selected = currentDestination?.hierarchy?.any { it.route == "journey_screen" } == true,
onClick = { onPassengerClicked() },
icon = {
Icon(
painterResource(id = R.drawable.world_pink),
Expand All @@ -51,9 58,10 @@ fun BottomBar(
alwaysShowLabel = true,
label = { Text(text = stringResource(R.string.passenger))}
)

NavigationBarItem(
selected = false,
onClick = { /*TODO*/ },
selected = currentDestination?.hierarchy?.any { it.route == "journey_create_screen" } == true,
onClick = { onDriverClicked() },
icon = {
Icon(
painterResource(id = R.drawable.car_pink),
Expand All @@ -70,5 78,5 @@ fun BottomBar(
@Composable
@Preview(showSystemUi = true, showBackground = true)
fun BottomBarPreview() {
BottomBar()
BottomBar( NavDestination(""), {},{},{})
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 3,32 @@ package com.juntas.juntas_app.shared_components
import android.os.Build
import androidx.annotation.RequiresApi
import androidx.compose.runtime.Composable
import androidx.compose.runtime.getValue
import androidx.navigation.compose.NavHost
import androidx.navigation.compose.composable
import androidx.navigation.compose.currentBackStackEntryAsState
import androidx.navigation.compose.rememberNavController
import com.juntas.juntas_app.home_screen.HomeScreen
import com.juntas.juntas_app.journey_create_first.domain.JourneyCreate
import com.juntas.juntas_app.journey_screen.presentation.JourneyScreen
import com.juntas.juntas_app.preference_screen.presentation.PreferenceScreen
import com.juntas.juntas_app.trip_screen.presentation.TripScreen

@RequiresApi(Build.VERSION_CODES.N)
@Composable
fun Navigation() {

val navController = rememberNavController()
//val navBackStackEntry by navController.currentBackStackEntryAsState()
//val currentDestination = navBackStackEntry?.destination
val navBackStackEntry by navController.currentBackStackEntryAsState()
val currentDestination = navBackStackEntry?.destination

val bottomBar: @Composable () -> Unit = {
BottomBar()
BottomBar(
currentDestination = currentDestination,
onHomeClicked = { navController.navigate("home_screen") },
onPassengerClicked = { navController.navigate("journey_screen") },
onDriverClicked = { navController.navigate("journey_create_screen") }
)
}
val topBar: @Composable () -> Unit = {
TopBar(
Expand Down Expand Up @@ -47,5 58,25 @@ fun Navigation() {
bottomBar = bottomBar
)
}

composable("journey_create_screen") {
JourneyCreate(
topBar = topBar,
bottomBar = bottomBar
)
}
composable("home_screen") {
HomeScreen()
}

composable("trip_screen") {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
TripScreen(
onBackClicked = { /*TODO*/ },
bottomBar = bottomBar,
topBar = topBar
)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 26,6 @@ import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import androidx.compose.ui.unit.dp
import com.juntas.juntas_app.R
import com.juntas.juntas_app.shared_components.BottomBar
import com.juntas.juntas_app.shared_components.TopBar
import com.juntas.juntas_app.trip_screen.presentation.components.TripCard
import java.time.LocalDate
import java.time.LocalTime
Expand All @@ -36,16 34,14 @@ import java.time.LocalTime
@Composable
fun TripScreen(
onBackClicked: () -> Unit,
topBar: @Composable () -> Unit,
bottomBar: @Composable () -> Unit,
modifier: Modifier = Modifier,
) {
Scaffold(
modifier = modifier.fillMaxSize(),
topBar = { TopBar(
onProfileClicked = { /*TODO*/ } ,
onNotificationsClicked = { /*TODO*/ } ,
imageUrl = ""
)},
bottomBar = { BottomBar() }
topBar = topBar,
bottomBar = bottomBar

){ paddingValues ->
//Top info
Expand Down Expand Up @@ -116,5 112,5 @@ fun TripScreen(
@Composable
@Preview(showBackground = true)
fun TripScreenPreview() {
TripScreen( {})
TripScreen( {},{},{})
}