diff --git a/app/src/main/java/com/kouros/navigation/ui/NavigationSheet.kt b/app/src/main/java/com/kouros/navigation/ui/NavigationSheet.kt index 84d8299..2795cdb 100755 --- a/app/src/main/java/com/kouros/navigation/ui/NavigationSheet.kt +++ b/app/src/main/java/com/kouros/navigation/ui/NavigationSheet.kt @@ -55,7 +55,7 @@ fun NavigationSheet( simulateNavigation() }) { Icon( - painter = painterResource(id = R.drawable.assistant_navigation_48px), + painter = painterResource(id = R.drawable.navigation_48px), "Simulate", modifier = Modifier.size(24.dp, 24.dp), ) diff --git a/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt b/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt index 2cfa951..0ae2588 100644 --- a/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt +++ b/app/src/main/java/com/kouros/navigation/ui/SearchSheet.kt @@ -151,7 +151,7 @@ fun SearchBar( SearchBarDefaults.InputField( leadingIcon = { Icon( - painter = painterResource(id = R.drawable.ic_search_black36dp), + painter = painterResource(id = R.drawable.search_48px), "Search", modifier = Modifier.size(24.dp, 24.dp), ) diff --git a/app/src/main/res/xml/automotive_app_desc.xml b/app/src/main/res/xml/automotive_app_desc.xml new file mode 100644 index 0000000..9dbd3ce --- /dev/null +++ b/app/src/main/res/xml/automotive_app_desc.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/automotive/src/main/res/values/strings.xml b/automotive/src/main/res/values/strings.xml new file mode 100644 index 0000000..4e441ec --- /dev/null +++ b/automotive/src/main/res/values/strings.xml @@ -0,0 +1,4 @@ + + + Navigation + \ No newline at end of file diff --git a/automotive/src/main/res/xml/automotive_app_desc.xml b/automotive/src/main/res/xml/automotive_app_desc.xml new file mode 100644 index 0000000..9dbd3ce --- /dev/null +++ b/automotive/src/main/res/xml/automotive_app_desc.xml @@ -0,0 +1,19 @@ + + + + + diff --git a/automotive/src/main/res/xml/file_provider_paths.xml b/automotive/src/main/res/xml/file_provider_paths.xml new file mode 100644 index 0000000..281517c --- /dev/null +++ b/automotive/src/main/res/xml/file_provider_paths.xml @@ -0,0 +1,18 @@ + + + + diff --git a/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt b/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt index 5cc062e..5451e07 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/map/MapView.kt @@ -1,5 +1,6 @@ package com.kouros.navigation.car.map +import android.annotation.SuppressLint import android.location.Location import android.content.Context import androidx.compose.foundation.Canvas @@ -115,41 +116,41 @@ fun MapLibre( fun RouteLayer(routeData: String?) { if (routeData != null && routeData.isNotEmpty()) { val routes = rememberGeoJsonSource(GeoJsonData.JsonString(routeData)) - LineLayer( - id = "routes-casing", - source = routes, - color = const(Color.White), - width = - interpolate( - type = exponential(1.2f), - input = zoom(), - 5 to const(0.4.dp), - 6 to const(0.8.dp), - 7 to const(2.0.dp), - 20 to const(24.dp), - ), - ) - LineLayer( - id = "routes", - source = routes, - color = const(RouteColor), - width = - interpolate( - type = exponential(1.2f), - input = zoom(), - 5 to const(0.4.dp), - 6 to const(0.7.dp), - 7 to const(1.75.dp), - 20 to const(22.dp), - ), - ) + LineLayer( + id = "routes-casing", + source = routes, + color = const(Color.White), + width = + interpolate( + type = exponential(1.2f), + input = zoom(), + 5 to const(0.4.dp), + 6 to const(0.8.dp), + 7 to const(2.0.dp), + 20 to const(24.dp), + ), + ) + LineLayer( + id = "routes", + source = routes, + color = const(RouteColor), + width = + interpolate( + type = exponential(1.2f), + input = zoom(), + 5 to const(0.4.dp), + 6 to const(0.7.dp), + 7 to const(1.75.dp), + 20 to const(22.dp), + ), + ) } } @Composable fun AmenityLayer(routeData: String?) { if (routeData != null && routeData.isNotEmpty()) { - val color = if (routeData.contains(Constants.PHARMACY)) { + val color = if (routeData.contains(Constants.PHARMACY)) { const(Color.Red) } else { const(Color.Green) @@ -164,6 +165,7 @@ fun AmenityLayer(routeData: String?) { ) } } + @Composable fun BuildingLayer(tiles: Source) { Anchor.Replace("building-3d") { @@ -177,7 +179,13 @@ fun BuildingLayer(tiles: Source) { } @Composable -fun DrawNavigationImages(padding: PaddingValues, speed: Float?, maxSpeed: Int, width: Int, height: Int) { +fun DrawNavigationImages( + padding: PaddingValues, + speed: Float?, + maxSpeed: Int, + width: Int, + height: Int +) { NavigationImage(padding, width, height) CurrentSpeed(width, height, speed) if (speed != null && maxSpeed > 0 && (speed * 3.6) > maxSpeed) { @@ -199,7 +207,7 @@ fun NavigationImage(padding: PaddingValues, width: Int, height: Int) { } } Icon( - painter = painterResource(id = R.drawable.navigation), + painter = painterResource(id = R.drawable.navigation_48px), "Navigation", tint = color.copy(alpha = 1f), modifier = Modifier.size(imageSize.dp, imageSize.dp), diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt index eeb6870..5044536 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/NavigationScreen.kt @@ -294,7 +294,7 @@ class NavigationScreen( CarIcon.Builder( IconCompat.createWithResource( carContext, - R.drawable.assistant_navigation_48px + R.drawable.navigation_48px ) ) .build() @@ -328,7 +328,7 @@ class NavigationScreen( private fun searchAction(): Action { return Action.Builder() - .setIcon(routeModel.createCarIcon(carContext, R.drawable.ic_search_black36dp)) + .setIcon(routeModel.createCarIcon(carContext, R.drawable.search_48px)) .setOnClickListener { startSearchScreen() } @@ -337,7 +337,7 @@ class NavigationScreen( private fun settingsAction(): Action { return Action.Builder() - .setIcon(routeModel.createCarIcon(carContext, R.drawable.settings_24px)) + .setIcon(routeModel.createCarIcon(carContext, R.drawable.settings_applications_48px)) .setOnClickListener { screenManager.push(SettingsScreen(carContext)) } diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt index dc454b3..acd6776 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/PlaceListScreen.kt @@ -152,7 +152,7 @@ class PlaceListScreen( .setIcon( RouteCarModel().createCarIcon( carContext, - R.drawable.ic_delete_foreground + R.drawable.ic_pan_24 ) ) .setOnClickListener { diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt index 39a3267..9b3d1b3 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/RoutePreviewScreen.kt @@ -143,7 +143,7 @@ class RoutePreviewScreen( .getString(R.string.favorites) else carContext.getString( - R.string.not_favorite_toast_msg + R.string.favorites ), CarToast.LENGTH_SHORT ) @@ -165,7 +165,7 @@ class RoutePreviewScreen( CarIcon.Builder( IconCompat.createWithResource( carContext, - R.drawable.ic_delete_foreground + R.drawable.ic_pan_24 ) ) .build() diff --git a/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt b/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt index 44f3e37..d3313fb 100644 --- a/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt +++ b/common/car/src/main/java/com/kouros/navigation/car/screen/SearchScreen.kt @@ -137,7 +137,7 @@ class SearchScreen( R.drawable.ic_favorite_white_24dp } else -> { - R.drawable.navigation + R.drawable.navigation_48px } } return CarIcon.Builder( diff --git a/common/data/src/main/res/drawable/ev_station_48px.xml b/common/data/src/main/res/drawable/ev_station_48px.xml index 4681f9c..dce7655 100644 --- a/common/data/src/main/res/drawable/ev_station_48px.xml +++ b/common/data/src/main/res/drawable/ev_station_48px.xml @@ -6,5 +6,5 @@ android:tint="?attr/colorControlNormal"> + android:pathData="M337,746L425,606L372,606L372,501L285,641L337,641L337,746ZM220,408L489,408L489,180Q489,180 489,180Q489,180 489,180L220,180Q220,180 220,180Q220,180 220,180L220,408ZM220,780L489,780L489,468L220,468L220,780ZM160,840L160,180Q160,156 178,138Q196,120 220,120L489,120Q513,120 531,138Q549,156 549,180L549,468L614,468Q634.71,468 649.36,482.64Q664,497.29 664,518L664,737Q664,759 681.5,773.5Q699,788 722,788Q745,788 765,773.5Q785,759 785,737L785,350L770,350Q757.25,350 748.63,341.37Q740,332.75 740,320L740,230L760,230L760,180L790,180L790,230L830,230L830,180L860,180L860,230L880,230L880,320Q880,332.75 871.38,341.37Q862.75,350 850,350L835,350L835,736.69Q835,780 801,810Q767,840 721.82,840Q677.66,840 645.83,810Q614,780 614,737L614,518Q614,518 614,518Q614,518 614,518L549,518L549,840L160,840ZM489,780L220,780L220,780L489,780Z"/> diff --git a/common/data/src/main/res/drawable/ic_close_white_24dp.xml b/common/data/src/main/res/drawable/ic_close_white_24dp.xml new file mode 100644 index 0000000..5832c5a --- /dev/null +++ b/common/data/src/main/res/drawable/ic_close_white_24dp.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/common/data/src/main/res/drawable/ic_favorite_filled_white_24dp.xml b/common/data/src/main/res/drawable/ic_favorite_filled_white_24dp.xml new file mode 100644 index 0000000..d3df144 --- /dev/null +++ b/common/data/src/main/res/drawable/ic_favorite_filled_white_24dp.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/common/data/src/main/res/drawable/ic_favorite_white_24dp.xml b/common/data/src/main/res/drawable/ic_favorite_white_24dp.xml new file mode 100644 index 0000000..7709015 --- /dev/null +++ b/common/data/src/main/res/drawable/ic_favorite_white_24dp.xml @@ -0,0 +1,26 @@ + + + + + diff --git a/common/data/src/main/res/drawable/ic_pan_24.xml b/common/data/src/main/res/drawable/ic_pan_24.xml new file mode 100644 index 0000000..1dfeed1 --- /dev/null +++ b/common/data/src/main/res/drawable/ic_pan_24.xml @@ -0,0 +1,28 @@ + + + + + + diff --git a/common/data/src/main/res/drawable/ic_place_white_24dp.xml b/common/data/src/main/res/drawable/ic_place_white_24dp.xml new file mode 100644 index 0000000..1ba39ce --- /dev/null +++ b/common/data/src/main/res/drawable/ic_place_white_24dp.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/common/data/src/main/res/drawable/ic_roundabout_ccw.png b/common/data/src/main/res/drawable/ic_roundabout_ccw.png new file mode 100644 index 0000000..478f371 Binary files /dev/null and b/common/data/src/main/res/drawable/ic_roundabout_ccw.png differ diff --git a/common/data/src/main/res/drawable/ic_turn_destination.png b/common/data/src/main/res/drawable/ic_turn_destination.png new file mode 100644 index 0000000..4dde74e Binary files /dev/null and b/common/data/src/main/res/drawable/ic_turn_destination.png differ diff --git a/common/data/src/main/res/drawable/ic_turn_name_change.png b/common/data/src/main/res/drawable/ic_turn_name_change.png new file mode 100644 index 0000000..363fc89 Binary files /dev/null and b/common/data/src/main/res/drawable/ic_turn_name_change.png differ diff --git a/common/data/src/main/res/drawable/ic_turn_normal_left.png b/common/data/src/main/res/drawable/ic_turn_normal_left.png new file mode 100644 index 0000000..572a48c Binary files /dev/null and b/common/data/src/main/res/drawable/ic_turn_normal_left.png differ diff --git a/common/data/src/main/res/drawable/ic_turn_normal_right.png b/common/data/src/main/res/drawable/ic_turn_normal_right.png new file mode 100644 index 0000000..b9cc652 Binary files /dev/null and b/common/data/src/main/res/drawable/ic_turn_normal_right.png differ diff --git a/common/data/src/main/res/drawable/ic_turn_slight_left.png b/common/data/src/main/res/drawable/ic_turn_slight_left.png new file mode 100644 index 0000000..0a0d417 Binary files /dev/null and b/common/data/src/main/res/drawable/ic_turn_slight_left.png differ diff --git a/common/data/src/main/res/drawable/ic_turn_slight_right.png b/common/data/src/main/res/drawable/ic_turn_slight_right.png new file mode 100644 index 0000000..bfcb32b Binary files /dev/null and b/common/data/src/main/res/drawable/ic_turn_slight_right.png differ diff --git a/common/data/src/main/res/drawable/ic_zoom_in_24.xml b/common/data/src/main/res/drawable/ic_zoom_in_24.xml new file mode 100644 index 0000000..36d3282 --- /dev/null +++ b/common/data/src/main/res/drawable/ic_zoom_in_24.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/common/data/src/main/res/drawable/ic_zoom_out_24.xml b/common/data/src/main/res/drawable/ic_zoom_out_24.xml new file mode 100644 index 0000000..089d265 --- /dev/null +++ b/common/data/src/main/res/drawable/ic_zoom_out_24.xml @@ -0,0 +1,25 @@ + + + + + diff --git a/common/data/src/main/res/drawable/local_gas_station_48px.xml b/common/data/src/main/res/drawable/local_gas_station_48px.xml index 8efba2b..301dd10 100644 --- a/common/data/src/main/res/drawable/local_gas_station_48px.xml +++ b/common/data/src/main/res/drawable/local_gas_station_48px.xml @@ -6,5 +6,5 @@ android:tint="?attr/colorControlNormal"> + android:pathData="M160,840L160,180Q160,156 178,138Q196,120 220,120L489,120Q513,120 531,138Q549,156 549,180L549,468L614,468Q634.63,468 649.31,482.69Q664,497.37 664,518L664,737Q664,758.68 679.5,773.34Q695,788 717,788Q739,788 754.5,773.34Q770,758.68 770,737L770,442Q759,448 747,451Q735,454 723,454Q683.52,454 656.26,426.74Q629,399.48 629,360Q629,328.39 647,303.19Q665,278 695,270L600,175L636,140L789,293Q803,307 811.5,323.5Q820,340 820,360L820,737Q820,780.26 790.18,810.13Q760.37,840 717.18,840Q674,840 644,810.13Q614,780.26 614,737L614,518Q614,518 614,518Q614,518 614,518L549,518L549,840L160,840ZM220,408L489,408L489,180Q489,180 489,180Q489,180 489,180L220,180Q220,180 220,180Q220,180 220,180L220,408ZM723,404Q741,404 754,391Q767,378 767,360Q767,342 754,329Q741,316 723,316Q705,316 692,329Q679,342 679,360Q679,378 692,391Q705,404 723,404ZM220,780L489,780L489,468L220,468L220,780ZM489,780L220,780L220,780L489,780Z"/> diff --git a/common/data/src/main/res/drawable/local_pharmacy_48px.xml b/common/data/src/main/res/drawable/local_pharmacy_48px.xml index c1ba6ad..c99e328 100644 --- a/common/data/src/main/res/drawable/local_pharmacy_48px.xml +++ b/common/data/src/main/res/drawable/local_pharmacy_48px.xml @@ -6,5 +6,5 @@ android:tint="?attr/colorControlNormal"> + android:pathData="M120,840L120,780L207,525L120,270L120,210L647,210L709,40L777,67L725,210L840,210L840,270L752,525L840,780L840,840L120,840ZM452,679L512,679L512,555L636,555L636,495L512,495L512,371L452,371L452,495L328,495L328,555L452,555L452,679ZM182,780L778,780L690,525L778,270L182,270L270,525L182,780ZM480,525L480,525L480,525L480,525L480,525L480,525Z"/> diff --git a/common/data/src/main/res/drawable/navigation_24px.xml b/common/data/src/main/res/drawable/navigation_24px.xml new file mode 100644 index 0000000..6c4832f --- /dev/null +++ b/common/data/src/main/res/drawable/navigation_24px.xml @@ -0,0 +1,10 @@ + + + diff --git a/common/data/src/main/res/drawable/navigation_48px.xml b/common/data/src/main/res/drawable/navigation_48px.xml new file mode 100644 index 0000000..e87c0a6 --- /dev/null +++ b/common/data/src/main/res/drawable/navigation_48px.xml @@ -0,0 +1,10 @@ + + + diff --git a/common/data/src/main/res/drawable/pan_tool_48px.xml b/common/data/src/main/res/drawable/pan_tool_48px.xml new file mode 100644 index 0000000..dc04dcd --- /dev/null +++ b/common/data/src/main/res/drawable/pan_tool_48px.xml @@ -0,0 +1,10 @@ + + + diff --git a/common/data/src/main/res/drawable/search_48px.xml b/common/data/src/main/res/drawable/search_48px.xml new file mode 100644 index 0000000..852066c --- /dev/null +++ b/common/data/src/main/res/drawable/search_48px.xml @@ -0,0 +1,10 @@ + + + diff --git a/common/data/src/main/res/drawable/settings_applications_48px.xml b/common/data/src/main/res/drawable/settings_applications_48px.xml new file mode 100644 index 0000000..b4c399f --- /dev/null +++ b/common/data/src/main/res/drawable/settings_applications_48px.xml @@ -0,0 +1,10 @@ + + + diff --git a/common/data/src/main/res/drawable/speed_camera_48px.xml b/common/data/src/main/res/drawable/speed_camera_48px.xml new file mode 100644 index 0000000..952d15a --- /dev/null +++ b/common/data/src/main/res/drawable/speed_camera_48px.xml @@ -0,0 +1,10 @@ + + + diff --git a/common/data/src/main/res/values/attrs.xml b/common/data/src/main/res/values/attrs.xml new file mode 100644 index 0000000..d6b0be2 --- /dev/null +++ b/common/data/src/main/res/values/attrs.xml @@ -0,0 +1,23 @@ + + + + + + + + + diff --git a/common/data/src/main/res/values/strings.xml b/common/data/src/main/res/values/strings.xml new file mode 100644 index 0000000..7bb0ec6 --- /dev/null +++ b/common/data/src/main/res/values/strings.xml @@ -0,0 +1,33 @@ + + + Speed camera + Dismiss + Gas station + Pharmacy + Charging station + Category + On + Off + Use telephon settings + Dark mode + Display settings + 3D building + Arrived! + Drive now + Stop + Avoid highways + Avoid tolls rows + No places + Recent destination + Contacts + Favorites + Recent item deleted + Route preview + Display + Navigation settings + Settings + Accept + Reject + OK + Search + \ No newline at end of file diff --git a/common/data/src/main/res/values/styles.xml b/common/data/src/main/res/values/styles.xml new file mode 100644 index 0000000..d983543 --- /dev/null +++ b/common/data/src/main/res/values/styles.xml @@ -0,0 +1,27 @@ + + + + +