diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/FloorSwitch.kt b/app/src/main/java/ru/spbu/depnav/ui/map/FloorSwitch.kt index 01a7a66d..6f1d76c3 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/FloorSwitch.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/FloorSwitch.kt @@ -38,7 +38,9 @@ import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier +import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview +import ru.spbu.depnav.R import ru.spbu.depnav.ui.theme.DepNavTheme /** Two buttons to switch the current map one floor up or down. */ @@ -60,7 +62,10 @@ fun FloorSwitch( onClick = { onClick(floor + 1) }, enabled = floor < maxFloor ) { - Icon(Icons.Rounded.KeyboardArrowUp, contentDescription = "Up arrow") + Icon( + Icons.Rounded.KeyboardArrowUp, + contentDescription = stringResource(R.string.label_to_floor_above) + ) } AnimatedContent( @@ -82,7 +87,10 @@ fun FloorSwitch( onClick = { onClick(floor - 1) }, enabled = floor > minFloor ) { - Icon(Icons.Rounded.KeyboardArrowDown, contentDescription = "Down arrow") + Icon( + Icons.Rounded.KeyboardArrowDown, + contentDescription = stringResource(R.string.label_to_floor_below) + ) } } } diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/MapLegendDialog.kt b/app/src/main/java/ru/spbu/depnav/ui/map/MapLegendDialog.kt new file mode 100644 index 00000000..9470d973 --- /dev/null +++ b/app/src/main/java/ru/spbu/depnav/ui/map/MapLegendDialog.kt @@ -0,0 +1,88 @@ +/** + * DepNav -- department navigator. + * Copyright (C) 2023 Timofey Pushkin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package ru.spbu.depnav.ui.map + +import androidx.annotation.StringRes +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.lazy.LazyColumn +import androidx.compose.foundation.text.InlineTextContent +import androidx.compose.foundation.text.appendInlineContent +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.LocalTextStyle +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton +import androidx.compose.runtime.Composable +import androidx.compose.ui.res.stringResource +import androidx.compose.ui.text.Placeholder +import androidx.compose.ui.text.PlaceholderVerticalAlign +import androidx.compose.ui.text.buildAnnotatedString +import ru.spbu.depnav.R +import ru.spbu.depnav.data.model.Marker +import ru.spbu.depnav.ui.theme.DEFAULT_PADDING + +/** Dialog with the map legend. **/ +@Composable +fun MapLegendDialog(onDismiss: () -> Unit) { + AlertDialog( + onDismissRequest = onDismiss, + confirmButton = { + TextButton(onClick = onDismiss) { + Text(stringResource(R.string.ok)) + } + }, + title = { Text(stringResource(R.string.map_legend)) }, + text = { + LazyColumn(verticalArrangement = Arrangement.spacedBy(DEFAULT_PADDING)) { + item { LegendItem(Marker.MarkerType.ENTRANCE, R.string.entrance_descr) } + item { LegendItem(Marker.MarkerType.STAIRS_UP, R.string.stairs_up_descr) } + item { LegendItem(Marker.MarkerType.STAIRS_DOWN, R.string.stairs_down_descr) } + item { LegendItem(Marker.MarkerType.STAIRS_BOTH, R.string.stairs_both_descr) } + item { LegendItem(Marker.MarkerType.ELEVATOR, R.string.elevator_descr) } + item { LegendItem(Marker.MarkerType.WC_MAN, R.string.wc_man_descr) } + item { LegendItem(Marker.MarkerType.WC_WOMAN, R.string.wc_woman_descr) } + item { LegendItem(Marker.MarkerType.WC, R.string.wc_descr) } + item { LegendItem(Marker.MarkerType.OTHER, R.string.other_descr) } + } + } + ) +} + +private const val INLINE_ICON_ID = "icon" + +@Composable +private fun LegendItem(markerType: Marker.MarkerType, @StringRes descriptionId: Int) { + Text( + text = buildAnnotatedString { + appendInlineContent(INLINE_ICON_ID) + append(" — ${stringResource(descriptionId)}") + }, + inlineContent = mapOf(INLINE_ICON_ID to getInlineMarkerView(markerType)) + ) +} + +@Composable +private fun getInlineMarkerView(type: Marker.MarkerType) = InlineTextContent( + Placeholder( + width = LocalTextStyle.current.lineHeight, + height = LocalTextStyle.current.lineHeight, + PlaceholderVerticalAlign.TextCenter + ) +) { + MarkerView(title = type.name, type = type, isClosed = false) +} diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/MapScreen.kt b/app/src/main/java/ru/spbu/depnav/ui/map/MapScreen.kt index d29da741..6981db9d 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/MapScreen.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/MapScreen.kt @@ -80,11 +80,16 @@ fun MapScreen(vm: MapScreenViewModel = hiltViewModel(), onStartSearch: () -> Uni return } - var openMenu by rememberSaveable { mutableStateOf(false) } - if (openMenu) { + var openMapLegend by rememberSaveable { mutableStateOf(false) } + if (openMapLegend) { + MapLegendDialog(onDismiss = { openMapLegend = false }) + } + + var openSettings by rememberSaveable { mutableStateOf(false) } + if (openSettings) { SettingsDialog( prefs = vm.prefs, - onDismiss = { openMenu = false } + onDismiss = { openSettings = false } ) } @@ -97,7 +102,8 @@ fun MapScreen(vm: MapScreenViewModel = hiltViewModel(), onStartSearch: () -> Uni visible = vm.showUI, currentFloor = vm.currentFloor, maxFloor = vm.floorsNum, - onOpenMenuClick = { openMenu = true }, + onOpenMapLegendClick = { openMapLegend = true }, + onOpenSettingsClick = { openSettings = true }, onStartSearchClick = onStartSearch, onSwitchFloorClick = { vm.viewModelScope.launch { vm.setFloor(it) } } ) @@ -127,7 +133,8 @@ private fun BoxScope.TopUi( visible: Boolean, currentFloor: Int, maxFloor: Int, - onOpenMenuClick: () -> Unit, + onOpenMapLegendClick: () -> Unit, + onOpenSettingsClick: () -> Unit, onStartSearchClick: () -> Unit, onSwitchFloorClick: (Int) -> Unit ) { @@ -149,7 +156,8 @@ private fun BoxScope.TopUi( ) { TopButton( text = stringResource(R.string.search_markers), - onSettingsClick = onOpenMenuClick, + onInfoClick = onOpenMapLegendClick, + onSettingsClick = onOpenSettingsClick, onSurfaceClick = onStartSearchClick, modifier = Modifier.fillMaxWidth(0.9f) ) diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/MarkerView.kt b/app/src/main/java/ru/spbu/depnav/ui/map/MarkerView.kt index fc66a60b..79221f4c 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/MarkerView.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/MarkerView.kt @@ -18,18 +18,18 @@ package ru.spbu.depnav.ui.map -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.size +import androidx.compose.material3.Icon import androidx.compose.material3.LocalTextStyle import androidx.compose.material3.MaterialTheme import androidx.compose.material3.Text import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier -import androidx.compose.ui.graphics.ColorFilter -import androidx.compose.ui.graphics.ColorMatrix +import androidx.compose.ui.draw.alpha import androidx.compose.ui.graphics.Shadow import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.style.TextDecoration import androidx.compose.ui.tooling.preview.Preview import androidx.compose.ui.unit.dp @@ -51,9 +51,9 @@ fun MarkerView( ) = when (type) { MarkerType.ROOM -> if (simplified) { MarkerIcon( - painter = painterResource(R.drawable.key_emoji), + painter = painterResource(R.drawable.mrk_room), faded = isClosed, - contentDescription = "Room", + contentDescription = stringResource(R.string.label_room_icon), modifier = modifier ) } else { @@ -64,57 +64,57 @@ fun MarkerView( ) } MarkerType.ENTRANCE -> MarkerIcon( - painter = painterResource(R.drawable.door_emoji), + painter = painterResource(R.drawable.mrk_entrance), faded = isClosed, - contentDescription = "Entrance", + contentDescription = stringResource(R.string.label_entrance_icon), modifier = modifier ) MarkerType.STAIRS_UP -> MarkerIcon( - painter = painterResource(R.drawable.up_arrow_emoji), + painter = painterResource(R.drawable.mrk_stairs_up), faded = isClosed, - contentDescription = "Stairs up", + contentDescription = stringResource(R.string.label_stairs_up_icon), modifier = modifier ) MarkerType.STAIRS_DOWN -> MarkerIcon( - painter = painterResource(R.drawable.down_arrow_emoji), + painter = painterResource(R.drawable.mrk_stairs_down), faded = isClosed, - contentDescription = "Stairs down", + contentDescription = stringResource(R.string.label_stairs_down_icon), modifier = modifier ) MarkerType.STAIRS_BOTH -> MarkerIcon( - painter = painterResource(R.drawable.up_down_arrow_emoji), + painter = painterResource(R.drawable.mrk_stairs), faded = isClosed, - contentDescription = "Stairs up and down", + contentDescription = stringResource(R.string.label_stairs_both_icon), modifier = modifier ) MarkerType.ELEVATOR -> MarkerIcon( - painter = painterResource(R.drawable.elevator_emoji), + painter = painterResource(R.drawable.mrk_elevator), faded = isClosed, - contentDescription = "Elevator", + contentDescription = stringResource(R.string.label_elevator_icon), modifier = modifier ) MarkerType.WC_MAN -> MarkerIcon( - painter = painterResource(R.drawable.mens_room_emoji), + painter = painterResource(R.drawable.mrk_wc_man), faded = isClosed, - contentDescription = "Men's room", + contentDescription = stringResource(R.string.label_wc_man_icon), modifier = modifier ) MarkerType.WC_WOMAN -> MarkerIcon( - painter = painterResource(R.drawable.womens_room_emoji), + painter = painterResource(R.drawable.mrk_wc_woman), faded = isClosed, - contentDescription = "Women's room", + contentDescription = stringResource(R.string.label_wc_woman_icon), modifier = modifier ) MarkerType.WC -> MarkerIcon( - painter = painterResource(R.drawable.restroom_emoji), + painter = painterResource(R.drawable.mrk_wc), faded = isClosed, - contentDescription = "Restroom", + contentDescription = stringResource(R.string.label_wc_icon), modifier = modifier ) MarkerType.OTHER -> MarkerIcon( - painter = painterResource(R.drawable.keycap_asterisk_emoji), + painter = painterResource(R.drawable.mrk_other), faded = isClosed, - contentDescription = "Other marker", + contentDescription = stringResource(R.string.label_other_icon), modifier = modifier ) } @@ -126,15 +126,13 @@ private fun MarkerIcon( contentDescription: String?, modifier: Modifier = Modifier ) { - Image( + Icon( painter = painter, contentDescription = contentDescription, modifier = Modifier .size(ICON_SIZE) - .then(modifier), - alpha = if (faded) 0.38f else 1f, - colorFilter = ColorFilter.colorMatrix(ColorMatrix().apply { setToSaturation(0f) }) - .takeIf { faded } + .alpha(if (faded) 0.38f else 1f) + .then(modifier) ) } diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/Pin.kt b/app/src/main/java/ru/spbu/depnav/ui/map/Pin.kt index 542cb7e2..3d4a5dcb 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/Pin.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/Pin.kt @@ -18,12 +18,14 @@ package ru.spbu.depnav.ui.map -import androidx.compose.foundation.Image import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.size +import androidx.compose.material3.Icon +import androidx.compose.material3.MaterialTheme import androidx.compose.runtime.Composable import androidx.compose.ui.Modifier import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource import androidx.compose.ui.unit.dp import ru.spbu.depnav.R @@ -32,12 +34,13 @@ private val SIZE = 30.dp /** Pin for highlighting map markers. */ @Composable fun Pin(modifier: Modifier = Modifier) { - Image( - painter = painterResource(id = R.drawable.round_pushpin_emoji), - contentDescription = "Pin", + Icon( + painter = painterResource(R.drawable.pin), + contentDescription = stringResource(R.string.label_selected_place), modifier = Modifier .size(SIZE) .offset(y = -SIZE / 2) - .then(modifier) + .then(modifier), + tint = MaterialTheme.colorScheme.primary ) } diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/SettingsDialog.kt b/app/src/main/java/ru/spbu/depnav/ui/map/SettingsDialog.kt index bbd53d26..489d48ba 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/SettingsDialog.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/SettingsDialog.kt @@ -33,6 +33,7 @@ import androidx.compose.material3.MaterialTheme import androidx.compose.material3.RadioButton import androidx.compose.material3.Switch import androidx.compose.material3.Text +import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier @@ -50,10 +51,13 @@ private val ADDITIONAL_START_PADDING = 4.dp /** Dialog with app settings. */ @Composable fun SettingsDialog(prefs: PreferencesManager, onDismiss: () -> Unit) { - // TODO: replace with a custom dialog AlertDialog( onDismissRequest = onDismiss, - confirmButton = {}, + confirmButton = { + TextButton(onClick = onDismiss) { + Text(stringResource(R.string.ok)) + } + }, title = { Text(stringResource(R.string.settings)) }, text = { LazyColumn( diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/TopButton.kt b/app/src/main/java/ru/spbu/depnav/ui/map/TopButton.kt index 35938f2b..2314208f 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/TopButton.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/TopButton.kt @@ -18,14 +18,16 @@ package ru.spbu.depnav.ui.map +import androidx.compose.foundation.ExperimentalFoundationApi +import androidx.compose.foundation.basicMarquee import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.size import androidx.compose.foundation.shape.CircleShape import androidx.compose.material.icons.Icons +import androidx.compose.material.icons.rounded.Info import androidx.compose.material.icons.rounded.Search import androidx.compose.material.icons.rounded.Settings -import androidx.compose.material3.ExperimentalMaterial3Api import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.LocalContentColor @@ -37,14 +39,17 @@ import androidx.compose.runtime.CompositionLocalProvider import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.platform.LocalViewConfiguration +import androidx.compose.ui.res.stringResource import androidx.compose.ui.tooling.preview.Preview +import ru.spbu.depnav.R import ru.spbu.depnav.ui.theme.DepNavTheme -/** Button with a search icon and text. */ -@OptIn(ExperimentalMaterial3Api::class) +/** Button with a search icon, text, and additional nested buttons. */ +@OptIn(ExperimentalFoundationApi::class) @Composable fun TopButton( text: String, + onInfoClick: () -> Unit, onSettingsClick: () -> Unit, onSurfaceClick: () -> Unit, modifier: Modifier = Modifier @@ -59,7 +64,10 @@ fun TopButton( modifier = Modifier.size(LocalViewConfiguration.current.minimumTouchTargetSize), contentAlignment = Alignment.Center ) { - Icon(Icons.Rounded.Search, contentDescription = "Open menu") + Icon( + Icons.Rounded.Search, + contentDescription = stringResource(R.string.label_search) + ) } CompositionLocalProvider( @@ -67,13 +75,25 @@ fun TopButton( ) { Text( text = text, - modifier = Modifier.weight(1f), + modifier = Modifier + .weight(1f) + .basicMarquee(), maxLines = 1, ) } + IconButton(onClick = onInfoClick) { + Icon( + Icons.Rounded.Info, + contentDescription = stringResource(R.string.label_open_map_info) + ) + } + IconButton(onClick = onSettingsClick) { - Icon(Icons.Rounded.Settings, contentDescription = "Open settings") + Icon( + Icons.Rounded.Settings, + contentDescription = stringResource(R.string.label_open_settings) + ) } } } @@ -86,6 +106,7 @@ private fun TopButtonPreview() { DepNavTheme { TopButton( text = "Search markers", + onInfoClick = {}, onSettingsClick = {}, onSurfaceClick = {} ) diff --git a/app/src/main/java/ru/spbu/depnav/ui/map/ZoomInHint.kt b/app/src/main/java/ru/spbu/depnav/ui/map/ZoomInHint.kt index 7bbd0ff8..7d8f0549 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/map/ZoomInHint.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/map/ZoomInHint.kt @@ -53,7 +53,7 @@ fun ZoomInHint() { ) { Icon( painter = painterResource(R.drawable.ic_pinch_zoom_in), - contentDescription = "Pinch to zoom in", + contentDescription = null, modifier = Modifier.size( with(LocalDensity.current) { MaterialTheme.typography.bodySmall.fontSize.toDp() * 2 diff --git a/app/src/main/java/ru/spbu/depnav/ui/search/SearchField.kt b/app/src/main/java/ru/spbu/depnav/ui/search/SearchField.kt index fb6a5696..8a76378e 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/search/SearchField.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/search/SearchField.kt @@ -48,7 +48,9 @@ import androidx.compose.ui.focus.focusRequester import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.RectangleShape import androidx.compose.ui.platform.LocalSoftwareKeyboardController +import androidx.compose.ui.res.stringResource import androidx.compose.ui.text.input.ImeAction +import ru.spbu.depnav.R /** Text field with a search icon. */ @Composable @@ -67,7 +69,10 @@ fun SearchField( val keyboard = LocalSoftwareKeyboardController.current IconButton(onClick = onBackClick) { - Icon(imageVector = Icons.Rounded.ArrowBack, contentDescription = "Navigate back") + Icon( + imageVector = Icons.Rounded.ArrowBack, + contentDescription = stringResource(R.string.label_navigate_back) + ) } TextField( @@ -92,7 +97,10 @@ fun SearchField( onClear() } ) { - Icon(Icons.Rounded.Close, contentDescription = "Clear field") + Icon( + Icons.Rounded.Close, + contentDescription = stringResource(R.string.label_clear_text_field) + ) } } }, diff --git a/app/src/main/java/ru/spbu/depnav/ui/search/SearchResults.kt b/app/src/main/java/ru/spbu/depnav/ui/search/SearchResults.kt index 04f33e2b..62950e0d 100644 --- a/app/src/main/java/ru/spbu/depnav/ui/search/SearchResults.kt +++ b/app/src/main/java/ru/spbu/depnav/ui/search/SearchResults.kt @@ -86,8 +86,8 @@ fun SearchResults( MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) ) { Icon( - painter = painterResource(R.drawable.ic_history), - contentDescription = "Search history", + painter = painterResource(R.drawable.ic_searched_for), + contentDescription = null, modifier = Modifier.size(28.dp) ) } @@ -187,7 +187,7 @@ private fun SearchResultHistoryPreview() { LocalContentColor provides MaterialTheme.colorScheme.onSurface.copy(alpha = 0.38f) ) { Icon( - painter = painterResource(R.drawable.ic_history), + painter = painterResource(R.drawable.ic_searched_for), contentDescription = null, modifier = Modifier.size(28.dp) ) diff --git a/app/src/main/res/drawable/door_emoji.xml b/app/src/main/res/drawable/door_emoji.xml deleted file mode 100644 index 6b576b5d..00000000 --- a/app/src/main/res/drawable/door_emoji.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/app/src/main/res/drawable/down_arrow_emoji.xml b/app/src/main/res/drawable/down_arrow_emoji.xml deleted file mode 100644 index b719b1dc..00000000 --- a/app/src/main/res/drawable/down_arrow_emoji.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/elevator_emoji.xml b/app/src/main/res/drawable/elevator_emoji.xml deleted file mode 100644 index 35e98994..00000000 --- a/app/src/main/res/drawable/elevator_emoji.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/drawable/ic_history.xml b/app/src/main/res/drawable/ic_history.xml deleted file mode 100644 index a0d9673b..00000000 --- a/app/src/main/res/drawable/ic_history.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - diff --git a/app/src/main/res/drawable/ic_pinch_zoom_in.xml b/app/src/main/res/drawable/ic_pinch_zoom_in.xml index f8a56530..a3f6fa75 100644 --- a/app/src/main/res/drawable/ic_pinch_zoom_in.xml +++ b/app/src/main/res/drawable/ic_pinch_zoom_in.xml @@ -1,9 +1,9 @@ + android:width="24dp" + android:height="24dp" + android:viewportWidth="960" + android:viewportHeight="960"> + android:pathData="m180,383 l-97,96q-9,8 -21,8.5T41,479q-9,-9 -9,-21t9,-21l96,-97L70,340q-13,0 -21.5,-8.5T40,310q0,-13 8.5,-21.5T70,280h130q17,0 28.5,11.5T240,320v130q0,13 -8.5,21.5T210,480q-13,0 -21.5,-8.5T180,450v-67ZM382,180h68q13,0 21.5,8.5T480,210q0,13 -8.5,21.5T450,240L320,240q-17,0 -28.5,-11.5T280,200v-130q0,-13 8.5,-21.5T310,40q13,0 21.5,8.5T340,70v68l96,-97q9,-9 21,-9t21,9q9,9 9,21.5t-9,21.5l-96,96ZM593,920q-24,0 -46,-9t-39,-26L332,708q-11,-11 -12,-27.5t11,-28.5l3,-3q16,-16 37.5,-21.5t42.5,0.5l66,19v-327q0,-17 11.5,-28.5T520,280q17,0 28.5,11.5T560,320v380q0,20 -16,32t-35,7l-46,-13 102,102q5,5 12.5,8.5T593,840h167q33,0 56.5,-23.5T840,760v-160q0,-17 11.5,-28.5T880,560q17,0 28.5,11.5T920,600v160q0,66 -47,113T760,920L593,920ZM645,440q17,0 28.5,11.5T685,480v160h-80v-160q0,-17 11.5,-28.5T645,440ZM765,480q17,0 28.5,11.5T805,520v120h-80v-120q0,-17 11.5,-28.5T765,480ZM702,720Z" /> diff --git a/app/src/main/res/drawable/ic_searched_for.xml b/app/src/main/res/drawable/ic_searched_for.xml new file mode 100644 index 00000000..16acf5ae --- /dev/null +++ b/app/src/main/res/drawable/ic_searched_for.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/key_emoji.xml b/app/src/main/res/drawable/key_emoji.xml deleted file mode 100644 index d243172f..00000000 --- a/app/src/main/res/drawable/key_emoji.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - diff --git a/app/src/main/res/drawable/keycap_asterisk_emoji.xml b/app/src/main/res/drawable/keycap_asterisk_emoji.xml deleted file mode 100644 index f1bf0228..00000000 --- a/app/src/main/res/drawable/keycap_asterisk_emoji.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/drawable/mens_room_emoji.xml b/app/src/main/res/drawable/mens_room_emoji.xml deleted file mode 100644 index 13360dbc..00000000 --- a/app/src/main/res/drawable/mens_room_emoji.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/mrk_elevator.xml b/app/src/main/res/drawable/mrk_elevator.xml new file mode 100644 index 00000000..e89b1dfd --- /dev/null +++ b/app/src/main/res/drawable/mrk_elevator.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/mrk_entrance.xml b/app/src/main/res/drawable/mrk_entrance.xml new file mode 100644 index 00000000..dde566a0 --- /dev/null +++ b/app/src/main/res/drawable/mrk_entrance.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/mrk_other.xml b/app/src/main/res/drawable/mrk_other.xml new file mode 100644 index 00000000..07a690d9 --- /dev/null +++ b/app/src/main/res/drawable/mrk_other.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/mrk_room.xml b/app/src/main/res/drawable/mrk_room.xml new file mode 100644 index 00000000..16ab0d81 --- /dev/null +++ b/app/src/main/res/drawable/mrk_room.xml @@ -0,0 +1,12 @@ + + + + diff --git a/app/src/main/res/drawable/mrk_stairs.xml b/app/src/main/res/drawable/mrk_stairs.xml new file mode 100644 index 00000000..0e2fab22 --- /dev/null +++ b/app/src/main/res/drawable/mrk_stairs.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/mrk_stairs_down.xml b/app/src/main/res/drawable/mrk_stairs_down.xml new file mode 100644 index 00000000..b1419eeb --- /dev/null +++ b/app/src/main/res/drawable/mrk_stairs_down.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/mrk_stairs_up.xml b/app/src/main/res/drawable/mrk_stairs_up.xml new file mode 100644 index 00000000..2dae1106 --- /dev/null +++ b/app/src/main/res/drawable/mrk_stairs_up.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/mrk_wc.xml b/app/src/main/res/drawable/mrk_wc.xml new file mode 100644 index 00000000..e02eabd6 --- /dev/null +++ b/app/src/main/res/drawable/mrk_wc.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/mrk_wc_man.xml b/app/src/main/res/drawable/mrk_wc_man.xml new file mode 100644 index 00000000..12b55013 --- /dev/null +++ b/app/src/main/res/drawable/mrk_wc_man.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/mrk_wc_woman.xml b/app/src/main/res/drawable/mrk_wc_woman.xml new file mode 100644 index 00000000..d0d7c778 --- /dev/null +++ b/app/src/main/res/drawable/mrk_wc_woman.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/pin.xml b/app/src/main/res/drawable/pin.xml new file mode 100644 index 00000000..539f5fc5 --- /dev/null +++ b/app/src/main/res/drawable/pin.xml @@ -0,0 +1,9 @@ + + + diff --git a/app/src/main/res/drawable/restroom_emoji.xml b/app/src/main/res/drawable/restroom_emoji.xml deleted file mode 100644 index 5791809f..00000000 --- a/app/src/main/res/drawable/restroom_emoji.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/round_pushpin_emoji.xml b/app/src/main/res/drawable/round_pushpin_emoji.xml deleted file mode 100644 index c9b6f37f..00000000 --- a/app/src/main/res/drawable/round_pushpin_emoji.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/drawable/up_arrow_emoji.xml b/app/src/main/res/drawable/up_arrow_emoji.xml deleted file mode 100644 index 3b46344f..00000000 --- a/app/src/main/res/drawable/up_arrow_emoji.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/drawable/up_down_arrow_emoji.xml b/app/src/main/res/drawable/up_down_arrow_emoji.xml deleted file mode 100644 index 4fc446f3..00000000 --- a/app/src/main/res/drawable/up_down_arrow_emoji.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - diff --git a/app/src/main/res/drawable/womens_room_emoji.xml b/app/src/main/res/drawable/womens_room_emoji.xml deleted file mode 100644 index cda12f48..00000000 --- a/app/src/main/res/drawable/womens_room_emoji.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 03afeec8..cacb7263 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -1,15 +1,54 @@ + Без названия - Поиск меток Закрыто + + + Поиск меток + Ничего не найдено + + + Условные обозначения + вход в здание + лестница вверх + лестница вниз + лестница в оба направления + лифт + мужской туалет + женский туалет + общий туалет + прочее + + Настройки Тема Тёмная Светлая Как в системе - Приблизьте, чтобы увидеть маркеры - Ничего не найдено - Жест поворота Карта + Жест поворота + + + Приблизьте, чтобы увидеть метки + + + На этаж выше + На этаж ниже + Помещение + Вход + Лестница вверх + Лестница вниз + Лестница в оба направления + Лифт + Мужской туалет + Женский туалет + Общий туалет + Иное место + Выбранное место + Искать + Открыть информацию о карте + Открыть настройки + Вернуться назад + Очистить поле ввода \ No newline at end of file diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index ef428616..0558b104 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -1,15 +1,58 @@ DepNav + + + OK + + No title - Search markers Closed + + + Search markers + Nothing was found + + + Map legend + building entrance + stairs to the floor above + stairs to the floor below + stairs in both directions + elevator + men\'s restroom + women\'s restroom + unisex restroom + miscellaneous + + Settings Theme Dark Light Match system - Zoom in to see markers - Nothing was found - Rotation gesture Map + Rotation gesture + + + Zoom in to see markers + + + To the floor above + To the floor below + Room + Entrance + Stairs to the floor above + Stairs to the floor below + Stairs in both directions + Elevator + Men\'s restroom + Women\'s restroom + Unisex restroom + Miscellaneous place + Selected place + Search + Open map info + Open settings + Navigate back + Clear text field \ No newline at end of file diff --git a/twitter_emoji_LICENSE b/twitter_emoji_LICENSE deleted file mode 100644 index dc8853a7..00000000 --- a/twitter_emoji_LICENSE +++ /dev/null @@ -1,393 +0,0 @@ -Attribution 4.0 International - -======================================================================= - -Creative Commons Corporation ("Creative Commons") is not a law firm and -does not provide legal services or legal advice. Distribution of -Creative Commons public licenses does not create a lawyer-client or -other relationship. Creative Commons makes its licenses and related -information available on an "as-is" basis. Creative Commons gives no -warranties regarding its licenses, any material licensed under their -terms and conditions, or any related information. Creative Commons -disclaims all liability for damages resulting from their use to the -fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and -conditions that creators and other rights holders may use to share -original works of authorship and other material subject to copyright -and certain other rights specified in the public license below. The -following considerations are for informational purposes only, are not -exhaustive, and do not form part of our licenses. - - Considerations for licensors: Our public licenses are - intended for use by those authorized to give the public - permission to use material in ways otherwise restricted by - copyright and certain other rights. Our licenses are - irrevocable. Licensors should read and understand the terms - and conditions of the license they choose before applying it. - Licensors should also secure all rights necessary before - applying our licenses so that the public can reuse the - material as expected. Licensors should clearly mark any - material not subject to the license. This includes other CC- - licensed material, or material used under an exception or - limitation to copyright. More considerations for licensors: - wiki.creativecommons.org/Considerations_for_licensors - - Considerations for the public: By using one of our public - licenses, a licensor grants the public permission to use the - licensed material under specified terms and conditions. If - the licensor's permission is not necessary for any reason--for - example, because of any applicable exception or limitation to - copyright--then that use is not regulated by the license. Our - licenses grant only permissions under copyright and certain - other rights that a licensor has authority to grant. Use of - the licensed material may still be restricted for other - reasons, including because others have copyright or other - rights in the material. A licensor may make special requests, - such as asking that all changes be marked or described. - Although not required by our licenses, you are encouraged to - respect those requests where reasonable. More_considerations - for the public: - wiki.creativecommons.org/Considerations_for_licensees - -======================================================================= - -Creative Commons Attribution 4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree -to be bound by the terms and conditions of this Creative Commons -Attribution 4.0 International Public License ("Public License"). To the -extent this Public License may be interpreted as a contract, You are -granted the Licensed Rights in consideration of Your acceptance of -these terms and conditions, and the Licensor grants You such rights in -consideration of benefits the Licensor receives from making the -Licensed Material available under these terms and conditions. - - -Section 1 -- Definitions. - - a. Adapted Material means material subject to Copyright and Similar - Rights that is derived from or based upon the Licensed Material - and in which the Licensed Material is translated, altered, - arranged, transformed, or otherwise modified in a manner requiring - permission under the Copyright and Similar Rights held by the - Licensor. For purposes of this Public License, where the Licensed - Material is a musical work, performance, or sound recording, - Adapted Material is always produced where the Licensed Material is - synched in timed relation with a moving image. - - b. Adapter's License means the license You apply to Your Copyright - and Similar Rights in Your contributions to Adapted Material in - accordance with the terms and conditions of this Public License. - - c. Copyright and Similar Rights means copyright and/or similar rights - closely related to copyright including, without limitation, - performance, broadcast, sound recording, and Sui Generis Database - Rights, without regard to how the rights are labeled or - categorized. For purposes of this Public License, the rights - specified in Section 2(b)(1)-(2) are not Copyright and Similar - Rights. - - d. Effective Technological Measures means those measures that, in the - absence of proper authority, may not be circumvented under laws - fulfilling obligations under Article 11 of the WIPO Copyright - Treaty adopted on December 20, 1996, and/or similar international - agreements. - - e. Exceptions and Limitations means fair use, fair dealing, and/or - any other exception or limitation to Copyright and Similar Rights - that applies to Your use of the Licensed Material. - - f. Licensed Material means the artistic or literary work, database, - or other material to which the Licensor applied this Public - License. - - g. Licensed Rights means the rights granted to You subject to the - terms and conditions of this Public License, which are limited to - all Copyright and Similar Rights that apply to Your use of the - Licensed Material and that the Licensor has authority to license. - - h. Licensor means the individual(s) or entity(ies) granting rights - under this Public License. - - i. Share means to provide material to the public by any means or - process that requires permission under the Licensed Rights, such - as reproduction, public display, public performance, distribution, - dissemination, communication, or importation, and to make material - available to the public including in ways that members of the - public may access the material from a place and at a time - individually chosen by them. - - j. Sui Generis Database Rights means rights other than copyright - resulting from Directive 96/9/EC of the European Parliament and of - the Council of 11 March 1996 on the legal protection of databases, - as amended and/or succeeded, as well as other essentially - equivalent rights anywhere in the world. - - k. You means the individual or entity exercising the Licensed Rights - under this Public License. Your has a corresponding meaning. - - -Section 2 -- Scope. - - a. License grant. - - 1. Subject to the terms and conditions of this Public License, - the Licensor hereby grants You a worldwide, royalty-free, - non-sublicensable, non-exclusive, irrevocable license to - exercise the Licensed Rights in the Licensed Material to: - - a. reproduce and Share the Licensed Material, in whole or - in part; and - - b. produce, reproduce, and Share Adapted Material. - - 2. Exceptions and Limitations. For the avoidance of doubt, where - Exceptions and Limitations apply to Your use, this Public - License does not apply, and You do not need to comply with - its terms and conditions. - - 3. Term. The term of this Public License is specified in Section - 6(a). - - 4. Media and formats; technical modifications allowed. The - Licensor authorizes You to exercise the Licensed Rights in - all media and formats whether now known or hereafter created, - and to make technical modifications necessary to do so. The - Licensor waives and/or agrees not to assert any right or - authority to forbid You from making technical modifications - necessary to exercise the Licensed Rights, including - technical modifications necessary to circumvent Effective - Technological Measures. For purposes of this Public License, - simply making modifications authorized by this Section 2(a) - (4) never produces Adapted Material. - - 5. Downstream recipients. - - a. Offer from the Licensor -- Licensed Material. Every - recipient of the Licensed Material automatically - receives an offer from the Licensor to exercise the - Licensed Rights under the terms and conditions of this - Public License. - - b. No downstream restrictions. You may not offer or impose - any additional or different terms or conditions on, or - apply any Effective Technological Measures to, the - Licensed Material if doing so restricts exercise of the - Licensed Rights by any recipient of the Licensed - Material. - - 6. No endorsement. Nothing in this Public License constitutes or - may be construed as permission to assert or imply that You - are, or that Your use of the Licensed Material is, connected - with, or sponsored, endorsed, or granted official status by, - the Licensor or others designated to receive attribution as - provided in Section 3(a)(1)(A)(i). - - b. Other rights. - - 1. Moral rights, such as the right of integrity, are not - licensed under this Public License, nor are publicity, - privacy, and/or other similar personality rights; however, to - the extent possible, the Licensor waives and/or agrees not to - assert any such rights held by the Licensor to the limited - extent necessary to allow You to exercise the Licensed - Rights, but not otherwise. - - 2. Patent and trademark rights are not licensed under this - Public License. - - 3. To the extent possible, the Licensor waives any right to - collect royalties from You for the exercise of the Licensed - Rights, whether directly or through a collecting society - under any voluntary or waivable statutory or compulsory - licensing scheme. In all other cases the Licensor expressly - reserves any right to collect such royalties. - - -Section 3 -- License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the -following conditions. - - a. Attribution. - - 1. If You Share the Licensed Material (including in modified - form), You must: - - a. retain the following if it is supplied by the Licensor - with the Licensed Material: - - i. identification of the creator(s) of the Licensed - Material and any others designated to receive - attribution, in any reasonable manner requested by - the Licensor (including by pseudonym if - designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of - warranties; - - v. a URI or hyperlink to the Licensed Material to the - extent reasonably practicable; - - b. indicate if You modified the Licensed Material and - retain an indication of any previous modifications; and - - c. indicate the Licensed Material is licensed under this - Public License, and include the text of, or the URI or - hyperlink to, this Public License. - - 2. You may satisfy the conditions in Section 3(a)(1) in any - reasonable manner based on the medium, means, and context in - which You Share the Licensed Material. For example, it may be - reasonable to satisfy the conditions by providing a URI or - hyperlink to a resource that includes the required - information. - - 3. If requested by the Licensor, You must remove any of the - information required by Section 3(a)(1)(A) to the extent - reasonably practicable. - - 4. If You Share Adapted Material You produce, the Adapter's - License You apply must not prevent recipients of the Adapted - Material from complying with this Public License. - - -Section 4 -- Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that -apply to Your use of the Licensed Material: - - a. for the avoidance of doubt, Section 2(a)(1) grants You the right - to extract, reuse, reproduce, and Share all or a substantial - portion of the contents of the database; - - b. if You include all or a substantial portion of the database - contents in a database in which You have Sui Generis Database - Rights, then the database in which You have Sui Generis Database - Rights (but not its individual contents) is Adapted Material; and - - c. You must comply with the conditions in Section 3(a) if You Share - all or a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not -replace Your obligations under this Public License where the Licensed -Rights include other Copyright and Similar Rights. - - -Section 5 -- Disclaimer of Warranties and Limitation of Liability. - - a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE - EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS - AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF - ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, - IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, - WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR - PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, - ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT - KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT - ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. - - b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE - TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, - NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, - INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, - COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR - USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN - ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR - DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR - IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. - - c. The disclaimer of warranties and limitation of liability provided - above shall be interpreted in a manner that, to the extent - possible, most closely approximates an absolute disclaimer and - waiver of all liability. - - -Section 6 -- Term and Termination. - - a. This Public License applies for the term of the Copyright and - Similar Rights licensed here. However, if You fail to comply with - this Public License, then Your rights under this Public License - terminate automatically. - - b. Where Your right to use the Licensed Material has terminated under - Section 6(a), it reinstates: - - 1. automatically as of the date the violation is cured, provided - it is cured within 30 days of Your discovery of the - violation; or - - 2. upon express reinstatement by the Licensor. - - For the avoidance of doubt, this Section 6(b) does not affect any - right the Licensor may have to seek remedies for Your violations - of this Public License. - - c. For the avoidance of doubt, the Licensor may also offer the - Licensed Material under separate terms or conditions or stop - distributing the Licensed Material at any time; however, doing so - will not terminate this Public License. - - d. Sections 1, 5, 6, 7, and 8 survive termination of this Public - License. - - -Section 7 -- Other Terms and Conditions. - - a. The Licensor shall not be bound by any additional or different - terms or conditions communicated by You unless expressly agreed. - - b. Any arrangements, understandings, or agreements regarding the - Licensed Material not stated herein are separate from and - independent of the terms and conditions of this Public License. - - -Section 8 -- Interpretation. - - a. For the avoidance of doubt, this Public License does not, and - shall not be interpreted to, reduce, limit, restrict, or impose - conditions on any use of the Licensed Material that could lawfully - be made without permission under this Public License. - - b. To the extent possible, if any provision of this Public License is - deemed unenforceable, it shall be automatically reformed to the - minimum extent necessary to make it enforceable. If the provision - cannot be reformed, it shall be severed from this Public License - without affecting the enforceability of the remaining terms and - conditions. - - c. No term or condition of this Public License will be waived and no - failure to comply consented to unless expressly agreed to by the - Licensor. - - d. Nothing in this Public License constitutes or may be interpreted - as a limitation upon, or waiver of, any privileges and immunities - that apply to the Licensor or You, including from the legal - processes of any jurisdiction or authority. - - -======================================================================= - -Creative Commons is not a party to its public licenses. -Notwithstanding, Creative Commons may elect to apply one of its public -licenses to material it publishes and in those instances will be -considered the "Licensor." Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as -otherwise permitted by the Creative Commons policies published at -creativecommons.org/policies, Creative Commons does not authorize the -use of the trademark "Creative Commons" or any other trademark or logo -of Creative Commons without its prior written consent including, -without limitation, in connection with any unauthorized modifications -to any of its public licenses or any other arrangements, -understandings, or agreements concerning use of licensed material. For -the avoidance of doubt, this paragraph does not form part of the public -licenses. - -Creative Commons may be contacted at creativecommons.org.