Compare commits
164 Commits
v2025.10.2
...
yannikblos
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0d3d1823d8 | ||
|
|
09e08c4c8f | ||
|
|
a0a5459b15 | ||
|
|
6e57f9a2ba | ||
|
|
d971c51fd1 | ||
|
|
ac23642462 | ||
|
|
cfe1ce2c67 | ||
|
|
e07b2e52b3 | ||
|
|
24f59a1344 | ||
|
|
85f4c1c3eb | ||
|
|
3a9faecc3d | ||
|
|
f0e078701e | ||
|
|
7e27971605 | ||
|
|
9267622494 | ||
|
|
82a4843431 | ||
|
|
5bd7a284fa | ||
|
|
84ecbaa63c | ||
|
|
91ba38df56 | ||
|
|
31dcb954b1 | ||
|
|
8b4eab3444 | ||
|
|
90c12003bd | ||
|
|
a4909a0554 | ||
|
|
1b9e9f5091 | ||
|
|
bd78355263 | ||
|
|
b3c188564e | ||
|
|
e891ffa5d1 | ||
|
|
8799c5613e | ||
|
|
4a91c55ece | ||
|
|
268ad19089 | ||
|
|
325f62d8cb | ||
|
|
443d24b8d0 | ||
|
|
c0e492247e | ||
|
|
e71550e78b | ||
|
|
b3991555b5 | ||
|
|
c21afb27bd | ||
|
|
dea24b5681 | ||
|
|
51859424ea | ||
|
|
b5404cc2c6 | ||
|
|
b8e0ad3b3e | ||
|
|
23b5d92d4f | ||
|
|
99f3639b9c | ||
|
|
e0f8e043bb | ||
|
|
7f4ff8b606 | ||
|
|
7132ff2ed8 | ||
|
|
7312560f48 | ||
|
|
39332db8fc | ||
|
|
8865dac083 | ||
|
|
e25e7dd583 | ||
|
|
9fa21f464c | ||
|
|
e79854a15a | ||
|
|
a3fc38952e | ||
|
|
b74d9b104b | ||
|
|
4567079c65 | ||
|
|
fd5c2e6cd1 | ||
|
|
ab4cae961f | ||
|
|
1f0c202f62 | ||
|
|
d9354e0bd1 | ||
|
|
f443d3a207 | ||
|
|
98fe26f4ab | ||
|
|
f6be1b0ebf | ||
|
|
0e3b6264b8 | ||
|
|
f5edbb33f8 | ||
|
|
81c59fe2c9 | ||
|
|
25d004f7b3 | ||
|
|
210b4df8b2 | ||
|
|
12b9504daa | ||
|
|
ae9dc62b54 | ||
|
|
42f059f8f7 | ||
|
|
936e05283c | ||
|
|
6cee8ee389 | ||
|
|
d92a26739b | ||
|
|
be906c7973 | ||
|
|
d1ff4f8c60 | ||
|
|
9b29191e63 | ||
|
|
73accecfd4 | ||
|
|
495d3e91fd | ||
|
|
7c92cdafa6 | ||
|
|
310287e918 | ||
|
|
bab74782f8 | ||
|
|
647b66cbd0 | ||
|
|
7bd8f8064a | ||
|
|
2b5930dff8 | ||
|
|
d4ac51cc02 | ||
|
|
09ab8322be | ||
|
|
5886d15e88 | ||
|
|
da7c3d6710 | ||
|
|
b806ab7443 | ||
|
|
da68f01ff9 | ||
|
|
44dc71066c | ||
|
|
c0396e96c6 | ||
|
|
1b66a9ac73 | ||
|
|
22a28d75cc | ||
|
|
a730fccf76 | ||
|
|
ae14c05559 | ||
|
|
9d908b5e3d | ||
|
|
3e67c82517 | ||
|
|
5962d60e42 | ||
|
|
e0ee0d9f57 | ||
|
|
1d80478eac | ||
|
|
2daf40479a | ||
|
|
5e7a30df8f | ||
|
|
35d4e8af8b | ||
|
|
20bfa0a1ad | ||
|
|
363f892752 | ||
|
|
d01ed97e34 | ||
|
|
6e12ede1d9 | ||
|
|
90dbfd6311 | ||
|
|
45cf6130f0 | ||
|
|
8a6ce5a561 | ||
|
|
5bf4a8296c | ||
|
|
a6314cc53a | ||
|
|
2820fbac46 | ||
|
|
7afb1df917 | ||
|
|
042d497a5e | ||
|
|
6dcf4b039e | ||
|
|
44f0db083f | ||
|
|
1c4b2ea991 | ||
|
|
658c3c0af8 | ||
|
|
f6e7580aff | ||
|
|
8e5c1a4d17 | ||
|
|
239332edb4 | ||
|
|
564c6203eb | ||
|
|
c727fd7f20 | ||
|
|
5cd9f1274b | ||
|
|
c8a965c855 | ||
|
|
0d4099b555 | ||
|
|
08bdf41bae | ||
|
|
6d28928f58 | ||
|
|
d748e4f4f2 | ||
|
|
a373a3151d | ||
|
|
7b1ed86a5f | ||
|
|
0eaa770b21 | ||
|
|
be3205a82d | ||
|
|
dc20e576f7 | ||
|
|
7915b85f58 | ||
|
|
6fe73a2e5c | ||
|
|
9dc3ccae4f | ||
|
|
448f21bb44 | ||
|
|
b5d65a0f78 | ||
|
|
6d774667c5 | ||
|
|
053f35b519 | ||
|
|
96d51dfcf9 | ||
|
|
cf1432cbf7 | ||
|
|
9ae005ac56 | ||
|
|
bdf9a335ae | ||
|
|
422b14d31a | ||
|
|
ee30622940 | ||
|
|
1e931c81d2 | ||
|
|
517cfb656a | ||
|
|
7b1a4ed7ac | ||
|
|
8926a9fe16 | ||
|
|
bdadd2689c | ||
|
|
c399d5e415 | ||
|
|
7feeb6eca6 | ||
|
|
547ff5795e | ||
|
|
de5b61fde0 | ||
|
|
59bbea44a5 | ||
|
|
9ca9704bd9 | ||
|
|
d283fd41ae | ||
|
|
f81eff2e33 | ||
|
|
1d7cf5ae39 | ||
|
|
0efe782325 | ||
|
|
a1e45b5837 | ||
|
|
7a03dd7cf6 |
382
.forgejo/workflows/map-generator.yml
Normal file
@@ -0,0 +1,382 @@
|
|||||||
|
name: map-generator
|
||||||
|
on:
|
||||||
|
workflow_dispatch: # Manual trigger
|
||||||
|
inputs:
|
||||||
|
jobs:
|
||||||
|
description: 'Which job(s) to run right now?'
|
||||||
|
required: true
|
||||||
|
default: 'all'
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- all
|
||||||
|
- copy-coasts
|
||||||
|
- planet
|
||||||
|
- wiki
|
||||||
|
- isolines
|
||||||
|
- subways
|
||||||
|
- tiger
|
||||||
|
- maps
|
||||||
|
|
||||||
|
env:
|
||||||
|
WIKIMEDIA_USERNAME: ${{ secrets.WIKIMEDIA_USERNAME }}
|
||||||
|
WIKIMEDIA_PASSWORD: ${{ secrets.WIKIMEDIA_PASSWORD }}
|
||||||
|
S3_KEY_ID: ${{ secrets.S3_KEY_ID }}
|
||||||
|
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
|
||||||
|
S3_ENDPOINT: ${{ secrets.S3_ENDPOINT }}
|
||||||
|
S3_BUCKET: ${{ secrets.S3_BUCKET }}
|
||||||
|
SFTP_USER: ${{ secrets.SFTP_USER }}
|
||||||
|
SFTP_PASSWORD: ${{ secrets.SFTP_PASSWORD }}
|
||||||
|
SFTP_HOST: ${{ secrets.SFTP_HOST }}
|
||||||
|
SFTP_PATH: ${{ secrets.SFTP_PATH }}
|
||||||
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
TZ: Etc/UTC
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
copy-coasts:
|
||||||
|
if: inputs.jobs == 'copy-coasts' || inputs.jobs == 'all'
|
||||||
|
name: Copy Previously Generated Coasts
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Copy Coasts
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ -f /media/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.geom ]; then
|
||||||
|
cp /media/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.geom /media/4tbexternal/osm-planet/latest_coasts.geom
|
||||||
|
cp /media/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.rawgeom /media/4tbexternal/osm-planet/latest_coasts.rawgeom
|
||||||
|
fi
|
||||||
|
|
||||||
|
update-planet:
|
||||||
|
if: inputs.jobs == 'planet' || inputs.jobs == 'all'
|
||||||
|
name: Update Planet
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -y
|
||||||
|
apt-get install -y pyosmium osmium-tool python3-venv python3-pip wget2
|
||||||
|
rm -f /usr/lib/python*/EXTERNALLY-MANAGED
|
||||||
|
pip3 install "protobuf<4"
|
||||||
|
- name: Download Planet File if Absent
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/osm-planet/planet/ ]; then
|
||||||
|
mkdir -p /media/4tbexternal/osm-planet/planet/
|
||||||
|
fi
|
||||||
|
if [ ! -f /media/4tbexternal/osm-planet/planet/planet-latest.osm.pbf ]; then
|
||||||
|
cd /media/4tbexternal/osm-planet/planet/
|
||||||
|
wget2 --verbose --progress=bar --continue --debug https://ftpmirror.your.org/pub/openstreetmap/pbf/planet-latest.osm.pbf
|
||||||
|
fi
|
||||||
|
- name: Update Planet
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd /media/4tbexternal/osm-planet/planet/
|
||||||
|
pyosmium-up-to-date planet-latest.osm.pbf -o planet-latest-new.osm.pbf -vv --size 16384
|
||||||
|
mv planet-latest-new.osm.pbf planet-latest.osm.pbf
|
||||||
|
- name: Converting planet-latest.osm.pbf to planet.o5m
|
||||||
|
run: /root/OM/osmctools/osmconvert planet-latest.osm.pbf -o=planet.o5m
|
||||||
|
|
||||||
|
wiki-update:
|
||||||
|
if: inputs.jobs == 'wiki' || inputs.jobs == 'all'
|
||||||
|
name: Update Wikipedia
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -y
|
||||||
|
apt-get install -y jq curl wget2 rustc cargo git ca-certificates
|
||||||
|
- name: Clone wikiparser if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/wikiparser ]; then
|
||||||
|
cd /media/4tbexternal
|
||||||
|
git clone https://codeberg.org/comaps/wikiparser.git
|
||||||
|
fi
|
||||||
|
- name: Check for planet file
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -f /media/4tbexternal/osm-planet/planet/planet-latest.osm.pbf ]; then
|
||||||
|
echo "ERROR: No file at /media/4tbexternal/osm-planet/planet/planet-latest.osm.pbf"
|
||||||
|
ls -al /media/4tbexternal/
|
||||||
|
ls -al /media/4tbexternal/osm-planet/
|
||||||
|
ls -al /media/4tbexternal/osm-planet/planet/
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Update Wikipedia from Enterprise API
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p /media/4tbexternal/osm-planet/wikipedia/dumps
|
||||||
|
mkdir -p /media/4tbexternal/osm-planet/wikipedia/build
|
||||||
|
cd /media/4tbexternal/wikiparser
|
||||||
|
ls -al
|
||||||
|
echo "Downloading ..."
|
||||||
|
./download.sh /media/4tbexternal/osm-planet/wikipedia/dumps
|
||||||
|
echo "Running ..."
|
||||||
|
./run.sh /media/4tbexternal/osm-planet/wikipedia/build \
|
||||||
|
/media/4tbexternal/osm-planet/planet/planet-latest.osm.pbf \
|
||||||
|
/media/4tbexternal/osm-planet/wikipedia/dumps/latest/*.tar.gz
|
||||||
|
echo "DONE"
|
||||||
|
|
||||||
|
update-isolines:
|
||||||
|
if: inputs.jobs == 'isolines' || inputs.jobs == 'all'
|
||||||
|
name: Update Isolines
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -qq \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
osmctools \
|
||||||
|
rclone \
|
||||||
|
git \
|
||||||
|
ca-certificates \
|
||||||
|
openssh-client \
|
||||||
|
sshpass \
|
||||||
|
vim \
|
||||||
|
wget \
|
||||||
|
build-essential \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3.12-venv \
|
||||||
|
qt6-base-dev \
|
||||||
|
qt6-positioning-dev \
|
||||||
|
libc++-dev \
|
||||||
|
libfreetype-dev \
|
||||||
|
libglvnd-dev \
|
||||||
|
libgl1-mesa-dev \
|
||||||
|
libharfbuzz-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libqt6svg6-dev \
|
||||||
|
libqt6positioning6-plugins \
|
||||||
|
libqt6positioning6 \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libxrandr-dev \
|
||||||
|
libxinerama-dev \
|
||||||
|
libxcursor-dev \
|
||||||
|
libxi-dev \
|
||||||
|
zlib1g-dev
|
||||||
|
rm -f /usr/lib/python*/EXTERNALLY-MANAGED
|
||||||
|
pip3 install "protobuf<4"
|
||||||
|
- name: Clone main repo if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/comaps-init ]; then
|
||||||
|
apt-get update -qq && apt-get install -y --no-install-recommends git
|
||||||
|
cd /media/4tbexternal
|
||||||
|
git clone --recurse-submodules --shallow-submodules -b rebase-generator-pastk-wb251014 --single-branch https://codeberg.org/comaps/comaps.git comaps-init
|
||||||
|
fi
|
||||||
|
- name: Update Isolines
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd /media/4tbexternal/comaps-init/
|
||||||
|
./tools/unix/build_omim.sh -R topography_generator_tool
|
||||||
|
rm -rf ../osm-planet/isolines/
|
||||||
|
mkdir ../osm-planet/isolines/
|
||||||
|
../omim-build-relwithdebinfo/topography_generator_tool \
|
||||||
|
--profiles_path=./data/conf/isolines/isolines-profiles.json \
|
||||||
|
--countries_to_generate_path=./data/conf/isolines/countries-to-generate.json \
|
||||||
|
--tiles_isolines_out_dir=../osm-planet/isolines/tmp-tiles/ \
|
||||||
|
--countries_isolines_out_dir=../osm-planet/isolines/ \
|
||||||
|
--data_dir=./data/ \
|
||||||
|
--srtm_path=../osm-planet/SRTM-patched-europe/ \
|
||||||
|
--threads=22
|
||||||
|
|
||||||
|
update-subways:
|
||||||
|
if: inputs.jobs == 'subways' || inputs.jobs == 'all'
|
||||||
|
name: Update Subways
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -qq && apt-get install -y --no-install-recommends curl osmctools osmium-tool python3-venv ca-certificates git python3-pip
|
||||||
|
rm -f /usr/lib/python*/EXTERNALLY-MANAGED
|
||||||
|
pip3 install "protobuf<4"
|
||||||
|
- name: Clone subways if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/subways ]; then
|
||||||
|
cd /media/4tbexternal
|
||||||
|
git clone https://codeberg.org/comaps/subways.git
|
||||||
|
fi
|
||||||
|
- name: Clone main repo if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/comaps-init ]; then
|
||||||
|
cd /media/4tbexternal
|
||||||
|
git clone --recurse-submodules --shallow-submodules -b rebase-generator-pastk-wb251014 --single-branch https://codeberg.org/comaps/comaps.git comaps-init
|
||||||
|
fi
|
||||||
|
- name: Update Subways
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd /media/4tbexternal/comaps-init/
|
||||||
|
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
|
||||||
|
./tools/unix/maps/generate_subways.sh
|
||||||
|
|
||||||
|
update-tiger:
|
||||||
|
if: inputs.jobs == 'tiger' || inputs.jobs == 'all'
|
||||||
|
name: Update TIGER
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -qq && apt-get install -y --no-install-recommends \
|
||||||
|
build-essential \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
ninja-build \
|
||||||
|
ca-certificates \
|
||||||
|
git \
|
||||||
|
wget2
|
||||||
|
- name: Clone main repo if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/comaps-init ]; then
|
||||||
|
cd /media/4tbexternal
|
||||||
|
git clone --recurse-submodules --shallow-submodules -b rebase-generator-pastk-wb251014 --single-branch https://codeberg.org/comaps/comaps.git comaps-init
|
||||||
|
fi
|
||||||
|
- name: Build address_parser
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd /media/4tbexternal/comaps-init
|
||||||
|
rm -rf ../omim-build-relwithdebinfo/CMakeCache.txt
|
||||||
|
rm -rf ../omim-build-relwithdebinfo/CMakeFiles
|
||||||
|
./tools/unix/build_omim.sh -R address_parser_tool
|
||||||
|
- name: Update TIGER from Nominatim
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd /media/4tbexternal/osm-planet/
|
||||||
|
wget2 https://nominatim.org/data/tiger-nominatim-preprocessed-latest.csv.tar.gz
|
||||||
|
tar -xOzf tiger-nominatim-preprocessed-latest.csv.tar.gz | /media/4tbexternal/omim-build-relwithdebinfo/address_parser_tool --output_path=./tiger
|
||||||
|
|
||||||
|
generate-maps:
|
||||||
|
if: inputs.jobs == 'maps' || inputs.jobs == 'all'
|
||||||
|
name: Generate Maps
|
||||||
|
runs-on: mapfilemaker
|
||||||
|
container:
|
||||||
|
image: ubuntu:latest
|
||||||
|
volumes:
|
||||||
|
- /media/4tbexternal:/media/4tbexternal
|
||||||
|
options: --ulimit nofile=262144:262144
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
steps:
|
||||||
|
- name: Install dependencies
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
apt-get update -qq \
|
||||||
|
&& apt-get install -y --no-install-recommends \
|
||||||
|
curl \
|
||||||
|
osmctools \
|
||||||
|
rclone \
|
||||||
|
git \
|
||||||
|
ca-certificates \
|
||||||
|
openssh-client \
|
||||||
|
sshpass \
|
||||||
|
vim \
|
||||||
|
wget \
|
||||||
|
build-essential \
|
||||||
|
clang \
|
||||||
|
cmake \
|
||||||
|
ninja-build \
|
||||||
|
python3 \
|
||||||
|
python3-pip \
|
||||||
|
python3.12-venv \
|
||||||
|
qt6-base-dev \
|
||||||
|
qt6-positioning-dev \
|
||||||
|
libc++-dev \
|
||||||
|
libfreetype-dev \
|
||||||
|
libglvnd-dev \
|
||||||
|
libgl1-mesa-dev \
|
||||||
|
libharfbuzz-dev \
|
||||||
|
libicu-dev \
|
||||||
|
libqt6svg6-dev \
|
||||||
|
libqt6positioning6-plugins \
|
||||||
|
libqt6positioning6 \
|
||||||
|
libsqlite3-dev \
|
||||||
|
libxrandr-dev \
|
||||||
|
libxinerama-dev \
|
||||||
|
libxcursor-dev \
|
||||||
|
libxi-dev \
|
||||||
|
zlib1g-dev
|
||||||
|
- name: Clone repo if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/comaps-init ]; then
|
||||||
|
cd /media/4tbexternal
|
||||||
|
git clone --recurse-submodules --shallow-submodules -b rebase-generator-pastk-wb251014 --single-branch https://codeberg.org/comaps/comaps.git comaps-init
|
||||||
|
fi
|
||||||
|
- name: Make output folders if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/osm-maps ]; then
|
||||||
|
mkdir -p /media/4tbexternal/osm-maps
|
||||||
|
fi
|
||||||
|
- name: Get SRTM if necessary
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [ ! -d /media/4tbexternal/osm-planet/SRTM-patched-europe/ ]; then
|
||||||
|
echo "ERROR: NO SRTM"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
- name: Symlink paths for repo scripts
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir -p /root/OM
|
||||||
|
ln -s /media/4tbexternal/comaps-init /root/OM/organicmaps
|
||||||
|
ln -s /media/4tbexternal/osm-planet /home/planet
|
||||||
|
ln -s /media/4tbexternal/osm-maps /root/OM/maps_build
|
||||||
|
- name: Run docker_maps_generator.sh
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
cd /root/OM/organicmaps
|
||||||
|
./tools/unix/docker_maps_generator.sh
|
||||||
@@ -175,10 +175,10 @@ if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID)
|
|||||||
find_package(Qt6 COMPONENTS REQUIRED ${qt_components} PATHS $ENV{QT_PATH} /opt/homebrew/opt/qt@6 /usr/local/opt/qt@6 /usr/lib/x86_64-linux-gnu/qt6)
|
find_package(Qt6 COMPONENTS REQUIRED ${qt_components} PATHS $ENV{QT_PATH} /opt/homebrew/opt/qt@6 /usr/local/opt/qt@6 /usr/lib/x86_64-linux-gnu/qt6)
|
||||||
|
|
||||||
set(MINIMUM_REQUIRED_QT_VERSION 6.4.0)
|
set(MINIMUM_REQUIRED_QT_VERSION 6.4.0)
|
||||||
if (Qt6Widgets_VERSION VERSION_LESS ${MINIMUM_REQUIRED_QT_VERSION})
|
if (Qt6_VERSION VERSION_LESS ${MINIMUM_REQUIRED_QT_VERSION})
|
||||||
message(FATAL_ERROR "Unsupported Qt version: ${Qt6Widgets_VERSION}, the minimum required is ${MINIMUM_REQUIRED_QT_VERSION}")
|
message(FATAL_ERROR "Unsupported Qt version: ${Qt6_VERSION}, the minimum required is ${MINIMUM_REQUIRED_QT_VERSION}")
|
||||||
else()
|
else()
|
||||||
message(STATUS "Found Qt version: ${Qt6Widgets_VERSION}")
|
message(STATUS "Found Qt version: ${Qt6_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -23,10 +23,10 @@
|
|||||||
<img src="https://img.shields.io/github/license/comaps/comaps?style=for-the-badge&logo=opensourceinitiative&logoColor=white&color=588157" alt="License"/>
|
<img src="https://img.shields.io/github/license/comaps/comaps?style=for-the-badge&logo=opensourceinitiative&logoColor=white&color=588157" alt="License"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/comaps/comaps/actions/workflows/android-check.yaml">
|
<a href="https://github.com/comaps/comaps/actions/workflows/android-check.yaml">
|
||||||
<img src="https://img.shields.io/github/actions/workflow/status/comaps/comaps/.github/workflows/android-check.yaml?label=Android%20Build&logo=android&logoColor=white&style=for-the-badge&color=588157" alt="Android Build Status"/>
|
<img src="https://img.shields.io/github/actions/workflow/status/comaps/comaps/.github/workflows/android-check.yaml?label=Android%20Build&logo=android&logoColor=white&style=for-the-badge" alt="Android Build Status"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://github.com/comaps/comaps/actions/workflows/ios-check.yaml">
|
<a href="https://github.com/comaps/comaps/actions/workflows/ios-check.yaml">
|
||||||
<img src="https://img.shields.io/github/actions/workflow/status/comaps/comaps/.github/workflows/ios-check.yaml?label=iOS%20Build&logo=apple&logoColor=white&style=for-the-badge&color=588157" alt="iOS Build Status"/>
|
<img src="https://img.shields.io/github/actions/workflow/status/comaps/comaps/.github/workflows/ios-check.yaml?label=iOS%20Build&logo=apple&logoColor=white&style=for-the-badge" alt="iOS Build Status"/>
|
||||||
</a>
|
</a>
|
||||||
<a href="https://opencollective.com/comaps">
|
<a href="https://opencollective.com/comaps">
|
||||||
<img src="https://img.shields.io/opencollective/all/comaps?label=Open%20Collective%20Donors&logo=opencollective&logoColor=white&style=for-the-badge&color=588157" alt="Open Collective Donors"/>
|
<img src="https://img.shields.io/opencollective/all/comaps?label=Open%20Collective%20Donors&logo=opencollective&logoColor=white&style=for-the-badge&color=588157" alt="Open Collective Donors"/>
|
||||||
|
|||||||
1
android/app/src/fdroid/play/listings/ast/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Mapas ensin conexón con privacidá
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
Лесна навигация - Открийте повече от вашето пътуване - Подкрепен от общността
|
||||||
1
android/app/src/fdroid/play/listings/bg/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Хайкинг, Велосипед, Пътуване без Интернет
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
• Vylepšena viditelnost a uživatelské rozhraní pokynů v navigaci
|
|
||||||
• Přidána možnost vynechat kroky
|
|
||||||
• Vylepšeno vyhledávání ve více jazycích
|
|
||||||
• Přidána specifická ikona pro autobusové zastávky
|
|
||||||
• Opraveny problémy s Android Auto (prostřednictvím projektu OM)
|
|
||||||
• Vylepšen editor a opraveny drobné problémy
|
|
||||||
• Vylepšeny styly map (prostřednictvím projektu OM)
|
|
||||||
• Vylepšeny překlady aplikace
|
|
||||||
Další změny najdete v našich poznámkách k vydání Codeberg!
|
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
• Verbesserte Sichtbarkeit & Benutzeroberfläche für Navigationsanweisungen
|
• OpenStreetMap-Daten vom 4. November
|
||||||
• Option um Treppen zu vermeiden
|
• Aktualisierte Karten-Icons, inkl. Farben für Unterhaltungs-, Sport- & andere Unternehmen
|
||||||
• Verbesserte Suche in mehreren Sprachen
|
• Informationen zu Steckdosen an EV-Ladestationen
|
||||||
• Spezifisches Symbol für Busbahnöfe hinzugefügt
|
• Symbole für Sportzentren, Veranstaltungsorte, Massagesalons, Gästehäuser und einige stillgelegte Unternehmen
|
||||||
• Probleme mit Android Auto behoben (via OM)
|
• Verbesserungen bei der Suche
|
||||||
• Verbesserter Editor mit kleinere Bugfixes
|
• Behebung eines Absturzes bei der Suche
|
||||||
• Kartenstile verbessert (via OM)
|
• Verbesserte Sprachführung während der Navigation
|
||||||
• Verbesserte Übersetzungen
|
Weitere Änderungen finden in unseren Codeberg-Versionshinweisen!
|
||||||
Für weitere Änderungen siehe Codeberg-Versionshinweise
|
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
• Improved visibility and UI of instructions in navigation
|
• OpenStreetMap data as of November 4
|
||||||
• Added option to avoid steps
|
• Recategorized map icons including some new colors for entertainment, sports and other businesses
|
||||||
• Improved search in multiple languages
|
• Display info about available sockets on charging stations
|
||||||
• Added specific icon for bus stations
|
• Added bandstands, backless benches and loungers
|
||||||
• Fixed Android Auto issues (via OM project)
|
• New icons for different sport centres, event venues, massage salons, guest houses and some disused businesses
|
||||||
• Improved editor and fix minor issues
|
• Multiple search improvements and crash fix
|
||||||
• Improved map styles (via OM project)
|
• Improved voice guidance during navigation
|
||||||
• Improved app translations
|
|
||||||
Check our Codeberg release notes for more changes!
|
Check our Codeberg release notes for more changes!
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
• Mejora de la visibilidad y la interfaz de usuario de las instrucciones de navegación
|
• Datos OSM del 04/11
|
||||||
• Se ha añadido la opción de evitar escaleras
|
• Iconos del mapa recategorizados, incluyendo nuevos colores
|
||||||
• Mejora de la búsqueda en varios idiomas como ES
|
• Visualización de información sobre enchufes disponibles en estaciones de recarga
|
||||||
• Se ha añadido un icono específico para las estaciones de autobús
|
• Adición de iconos para diferentes centros deportivos, lugares de eventos, salones de masajes, posadas y algunos establecimientos comerciales desactivados
|
||||||
• Se han solucionado los problemas de Android Auto (a través del proyecto OM)
|
• Varias mejoras y correcciones de errores en la búsqueda
|
||||||
• Se ha mejorado el editor y se han solucionado pequeños problemas
|
• Mejora en la orientación por voz durante la navegación
|
||||||
• Se han mejorado los estilos de los mapas (a través del proyecto OM)
|
|
||||||
Más detalles en Codeberg
|
Más detalles en Codeberg
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
• Interface utilisateur et visibilité des instructions en navigation améliorée
|
• Données OpenStreetMap au 4 novembre
|
||||||
• Option pour éviter les escaliers ajoutée
|
• Recatégorisation des icônes sur la carte avec ajout de nouvelles couleurs pour certains types de lieux
|
||||||
• Recherche améliorée dans différents languages
|
• Affichage des prises sur les bornes électriques
|
||||||
• Icône pour les gares routières ajoutée
|
• Ajout d'icônes pour les centres sportifs, salles d'événements, salon de massage et autres lieux
|
||||||
• Corrections de bugs liées à Android Auto (via OM)
|
• Multiple améliorations dans la recherche
|
||||||
• Editeur amélioré et corrections de bugs
|
• Correction d'un plantage dans la recherche
|
||||||
• Style de la carte amélioré (via OM)
|
• Amélioration de la synthèse vocale durant la navigation
|
||||||
• Traductions améliorées
|
|
||||||
Plus d'informations sur notre Codeberg
|
Plus d'informations sur notre Codeberg
|
||||||
|
|||||||
@@ -1,9 +1,7 @@
|
|||||||
• Visibilidade e interface do usuário aprimoradas para instruções na navegação
|
• Dados OSM de 04/11
|
||||||
• Opção adicionada para evitar degraus
|
• Ícones do mapa recategorizados, incluindo novas cores
|
||||||
• Busca aprimorada em vários idiomas
|
• Exibição de informações sobre tomadas disponíveis em eletropostos
|
||||||
• Adição de ícone específico para rodoviárias
|
• Adição de ícones para diferentes centros esportivos, locais de eventos, salões de massagem, pousadas e alguns estabelecimentos comerciais desativados
|
||||||
• Problemas corrigidos no Android Auto (via projeto OM)
|
• Diversas melhorias e correção de erro na busca
|
||||||
• Editor aprimorado e correção de problemas menores
|
• Melhoria na orientação por voz durante a navegação
|
||||||
• Estilos de mapa aprimorados (via projeto OM)
|
Confira nossas notas de lançamento no Codeberg para mais detalhes!
|
||||||
• Traduções aprimoradas
|
|
||||||
Confira nossas notas de lançamento do Codeberg para mais mudanças!
|
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
Uma aplicação pela comunidade, grátis e ‘open-source’, de mapas baseada em dados do OpenStreetMap e reforçada com compromisso para transparência, privacidade e sem fins lucrativos. CoMaps é um fork/spin-off de Organic Maps, que, por sua vez, é um fork de Maps.ME
|
||||||
|
|
||||||
|
Leia sobre as razões deste projeto e a sua direção em <b><i>codeberg.org/comaps</i></b>.
|
||||||
|
Junte-se à comunidade e ajude a fazer a melhor aplicação de mapas
|
||||||
|
• Use a aplicação e partilhe-a com outros
|
||||||
|
• Dê ‘feedback’ e reporte problemas
|
||||||
|
• Atualize os dados de mapa na aplicação ou no site do OpenStreetMap
|
||||||
|
|
||||||
|
‣ <b>Simples e Polida</b>: funcionalidades essenciais fáceis que “somente funcionam”.
|
||||||
|
‣ <b>Foco Offline</b>: Planeie e navegue as suas viagens no estrangeiro sem dados móveis, procure locais numa caminhada distante, etc. Todas as funções da aplicação foram criadas com intenção de serem usadas sem internet.
|
||||||
|
‣ <b>Respeita a privacidade</b>: A aplicação foi criada com privacidade em mente — não identifica o utilizador, não rastreia, e não usa a sua informação pessoal. Sem anúncios.
|
||||||
|
‣ <b>Saves Your Battery and Space</b>: Não esgota a sua bateria ao contrário de outras aplicações. Mapas compactos salvam espaço no seu telemóvel.
|
||||||
|
‣ <b>Gratuita e Feita pela Comunidade</b>: Pessoas como si ajudam a criar a aplicação ao adicionar locais ao OpenStreetMap, testando e dando opiniões em funcionalidades e contribuindo com dotes de desenvolvimento e dinheiro.
|
||||||
|
‣ <b>Decisões e Finanças Abertas e Transparentes, Sem fins lucrativos e ‘Open-Source’.</b>
|
||||||
|
|
||||||
|
<b>Funcionalidades principais</b>:
|
||||||
|
• Mapas detalhados descarregáveis com locais que não estão disponíveis com o Google Maps
|
||||||
|
• Modo ao Ar Livre com trilhos de caminhada destacados, acampamentos, fontes de água, cumes, curvas de nível, etc
|
||||||
|
• Caminhos pedestres e ciclovias
|
||||||
|
• Pontos de interesse como restaurantes, estações de serviço, hotéis, lojas, atrações e muitos mais
|
||||||
|
• Pesquise por nome, endereço, ou por categoria de ponto de interesse
|
||||||
|
• Navegação com anúncios de voz ao caminhar, pedalar ou conduzir
|
||||||
|
• Marque os seus locais favoritos com um único clique
|
||||||
|
• Artigos da Wikipédia Offline
|
||||||
|
• Camada de metro e direções
|
||||||
|
• Gravação de Percursos
|
||||||
|
• Exportar e importar marcadores e percursos em formatos KML, KMZ, GPX
|
||||||
|
• Um modo escuro para usar durante a noite
|
||||||
|
• Melhore a informação do mapa para todos com um editor básico embebido
|
||||||
|
|
||||||
|
<b>A liberdade chegou</b>
|
||||||
|
Descubra a sua jornada, navegue o mundo com privacidade e a comunidade à frente!
|
||||||
@@ -1,9 +1,8 @@
|
|||||||
• Лучшая видимость и интерфейс при навигации
|
• Карты OpenStreetMap от 4 ноября
|
||||||
• Добавлена возможность пропускать шаги
|
• Обновлены цвета иконок на карте, добавлены новые цвета для развлечений, спорта, некоторых бизнесов
|
||||||
• Улучшен поиск на нескольких языках
|
• На зарядных станциях показываются имеющиеся типы разъёмов
|
||||||
• Новый значок автостанций
|
• Добавлены эстрады, скамейки без спинок и лежаки
|
||||||
• Исправлены проблемы с Android Auto (через OM)
|
• Новые иконки для разных спорт центров, массажных салонов, гостевых домов, некоторых закрытых бизнесов
|
||||||
• Улучшен редактор и исправлены мелкие недочёты
|
• Несколько улучшений и исправлений в поиске
|
||||||
• Улучшены стили карт (через OM)
|
• Улучшены голосовые подсказки при навигации
|
||||||
• Улучшены переводы приложения
|
Подробнее смотрите на codeberg.org/comaps/comaps/releases
|
||||||
Ознакомьтесь с примечаниями к выпуску Codeberg, чтобы узнать изменениях!
|
|
||||||
|
|||||||
31
android/app/src/fdroid/play/listings/sl/full-description.txt
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
Brezplačno in odprtokodno zemljevidno orodje, ki ga vodi skupnost, temelji na podatkih OpenStreetMap in je okrepljena s predanostjo transparentnosti, zasebnosti in nedobičkonosnosti. CoMaps je izpeljanka OrganicMaps, ta pa je izpeljanka Maps.ME.
|
||||||
|
|
||||||
|
Preverite si o razlogih za ta projekt in njegovi usmerjenosti na <b><i>codeberg.org/comaps</i></b>.
|
||||||
|
Pridružite se skupnosti in pomagajte narediti najboljše zemljevidno orodje
|
||||||
|
• Uporabljajte orodje in širite glas o njem
|
||||||
|
• Dajajte povratne informacije in poročajte o napakah
|
||||||
|
• Posodabljajte podatke zemljevida v tem orodju ali na spletni strani OpenStreetMap
|
||||||
|
|
||||||
|
‣ <b>Osredotočeno na uporabo brez povezave</b>: Načrtujte in se usmerjajte na vašem potovanju v tujini vrez potrebe po mobilnih podatkih, iščite vmesne točke potocanja ko ste na daljšem pohodu ipd. Vse zmogljivosti orodja so zasnovane za delo brez povezave.
|
||||||
|
‣ <b>Spoštovanje zasebnosti</b>: orodje je zasnovano z mislijo na zasebnost – ne prepoznava oseb, ne sledi in ne zbira osebnih podatkov. Brez oglasov.
|
||||||
|
‣ <b>Preprosto in dodelano</b>: nujne zmogljivosti, enostavne za uporabo, ki preprosto delujejo.
|
||||||
|
‣ <b>Prihrani vašo baterijo in prostor.</b>: ne izčrpava vaše baterije kakor druga usmerjevalna orodja. Strnjeni zemljevidi prihranijo dragocen prostor na vašem telefonu.
|
||||||
|
‣ <b>Brezplačno in ustvarjeno v skupnosti</b>: ljudje kot ste vi pomagajo ustvarjati to orodje, tako da dodajajo kraje na OpenStreetMap, preizkušajo in dajejo povratne informacije o zmogljivostih in prispevajo svoje razvijalske sposobnosti in sredstva.
|
||||||
|
‣ <b>Odprto in transparentno odločanje in finance, nedobičkonosno in popolnoma odprtokodno.</b>
|
||||||
|
|
||||||
|
<b>Glavne zmogljivosti</b>:
|
||||||
|
• Prenosljivi podrobni zemljevidi s kraji, ki na Googlovoh zemljevidih niso na voljo.
|
||||||
|
• Prikaz za dejavnosti na prostem s poudarjenimi pohodniškimi potmi, tabornimi prostori, vodnimi viri, vrhovi, plastnicami itd.
|
||||||
|
• Pešpoti in kolesarke poti
|
||||||
|
• Kraji zanimanja, npr. restavracije, bencinske črpalke, hoteli, trgovine, znamenitosti in mnogo več
|
||||||
|
• Iščite po imenu, hišnemu naslovu ali po vrsti
|
||||||
|
• Usmerjanje z glasovnimi obvestili za hojo, kolesarjenje ali vožnjo avtomobila.
|
||||||
|
• Zaznamujte svoje najljubše kraje s preprostim dotikom
|
||||||
|
• Wikipedijini članki brez povezave
|
||||||
|
• Prometna plast podzemne železnice z usmerjanjem
|
||||||
|
• Izvozite ali uvozite zaznamke in sledi v oblikah KML, KMZ, GPX
|
||||||
|
• Temni prikaz za uporabo ponoči
|
||||||
|
• Izboljšajtw podatke zemljevida za vse z uporabo vgrajenega urejevalnika
|
||||||
|
|
||||||
|
<b>Svoboda je tu</b>
|
||||||
|
Odkijte več o vašem potovanju, usmerjajte se po svetu s poudarkom na zasebnosti in skupnostnem delovanju!
|
||||||
@@ -1 +1 @@
|
|||||||
Enostavna navigacija – Odkrij več o svojem potovanju – Podprto v skupnosti
|
Enostavno usmerjanje – Odkrij več o svojem potovanju – Podprto v skupnosti
|
||||||
|
|||||||
1
android/app/src/fdroid/play/listings/sv-SE/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Comaps- Vandra, Cykla, Kör Offline, Privat
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
这是一个由社区主导、以 OpenStreetMap 数据为基础的免费开源地图应用,建立在我们对运营透明、隐私安全和非营利性的承诺之上。CoMaps 是 Organic Maps 的分叉/衍生产品,而 Organic Maps 则是 Maps.ME 的分叉。
|
这是一个由社区主导、以 OpenStreetMap 数据为基础的自由开源地图应用,建立在我们对运营透明、隐私安全和非营利性的承诺之上。CoMaps 是 Organic Maps 的分叉/衍生产品,而 Organic Maps 则是 Maps.ME 的分叉。
|
||||||
|
|
||||||
如需了解此项目诞生的原因及未来方向,请访问 <b><i>codeberg.org/comaps</i></b>。
|
如需了解此项目诞生的原因及未来方向,请访问 <b><i>codeberg.org/comaps</i></b>。
|
||||||
加入以上社区,和大家一起打造最优质的地图应用
|
加入以上社区,和大家一起打造最优质的地图应用
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
‣ <b>尊重隐私</b>:开发者们在设计 CoMaps 时,优先考虑的是保护用户隐私。CoMaps 无法识别用户身份、无法跟踪用户活动,也无法收集个人信息。此外,CoMaps 不会也不能显示任何广告。
|
‣ <b>尊重隐私</b>:开发者们在设计 CoMaps 时,优先考虑的是保护用户隐私。CoMaps 无法识别用户身份、无法跟踪用户活动,也无法收集个人信息。此外,CoMaps 不会也不能显示任何广告。
|
||||||
‣ <b>简洁精致</b>:轻便易用、不出差错的基本功能。
|
‣ <b>简洁精致</b>:轻便易用、不出差错的基本功能。
|
||||||
‣ <b>节省电池电量和空间</b>:不会像其他导航应用那样耗电。精简的地图可以节省宝贵的手机空间。
|
‣ <b>节省电池电量和空间</b>:不会像其他导航应用那样耗电。精简的地图可以节省宝贵的手机空间。
|
||||||
‣ <b>由社区合作创建的免费应用</b>:如同您一样的用户通过向 OpenStreetMap 添加地点、测试功能并提供反馈、无私地贡献自己的编程技能和资金,协力开发了 CoMaps。
|
‣ <b>自由且社区共建</b>:如同您一样的用户通过向 OpenStreetMap 添加地点、测试功能并提供反馈、无私地贡献自己的编程技能和资金,协力开发了 CoMaps。
|
||||||
‣ <b>决策问责、财务透明、非营利性、完全开源。</b>
|
‣ <b>决策问责、财务透明、非营利性、完全开源。</b>
|
||||||
|
|
||||||
<b>主要功能</b>:
|
<b>主要功能</b>:
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
• 地铁交通图层和路线指示
|
• 地铁交通图层和路线指示
|
||||||
• 轨迹记录
|
• 轨迹记录
|
||||||
• 以 KML、KMZ 和 GPX 格式导出和导入书签和轨迹
|
• 以 KML、KMZ 和 GPX 格式导出和导入书签和轨迹
|
||||||
• 选择天暗后自动开启的黑暗模式
|
• 深色模式,适配夜间使用场景
|
||||||
• 使用基本的内置编辑器来编辑 OpenStreetMap 地点,帮助大家改进地图数据
|
• 使用基本的内置编辑器来编辑 OpenStreetMap 地点,帮助大家改进地图数据
|
||||||
|
|
||||||
<b>自由在此</b>
|
<b>自由在此</b>
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
Лесна навигация - Открийте повече от вашето пътуване - Подкрепен от общността
|
||||||
1
android/app/src/google/play/listings/bg/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Пътуване с Приватност
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
Uma aplicação pela comunidade, grátis e ‘open-source’, de mapas baseada em dados do OpenStreetMap e reforçada com compromisso para transparência, privacidade e sem fins lucrativos.
|
||||||
|
|
||||||
|
Junte-se à comunidade e ajude a fazer a melhor aplicação de mapas
|
||||||
|
• Use a aplicação e partilhe-a com outros
|
||||||
|
• Dê ‘feedback’ e reporte problemas
|
||||||
|
• Atualize os dados de mapa na aplicação ou no site do OpenStreetMap
|
||||||
|
|
||||||
|
<i>O seu ‘feedback’ e ‘reviews’ de 5 estrelas são a melhor maneira de nos ajudar!</i>
|
||||||
|
|
||||||
|
‣ <b>Simples e Polida</b>: funcionalidades essenciais fáceis que “somente funcionam”.
|
||||||
|
‣ <b>Foco Offline</b>: Planeie e navegue as suas viagens no estrangeiro sem dados móveis, procure locais numa caminhada distante, etc. Todas as funções da aplicação foram criadas com intenção de serem usadas sem internet.
|
||||||
|
‣ <b>Respeita a privacidade</b>: A aplicação foi criada com privacidade em mente — não identifica o utilizador, não rastreia, e não usa a sua informação pessoal. Sem anúncios.
|
||||||
|
‣ <b>Saves Your Battery and Space</b>: Não esgota a sua bateria ao contrário de outras aplicações. Mapas compactos salvam espaço no seu telemóvel.
|
||||||
|
‣ <b>Gratuita e Feita pela Comunidade</b>: Pessoas como si ajudam a criar a aplicação ao adicionar locais ao OpenStreetMap, testando e dando opiniões em funcionalidades e contribuindo com dotes de desenvolvimento e dinheiro.
|
||||||
|
‣ <b>Decisões e Finanças Abertas e Transparentes, Sem fins lucrativos e ‘Open-Source’.</b>
|
||||||
|
|
||||||
|
<b>Funcionalidades principais</b>:
|
||||||
|
• Mapas detalhados descarregáveis com locais que não estão disponíveis com o Google Maps
|
||||||
|
• Modo ao Ar Livre com trilhos de caminhada destacados, acampamentos, fontes de água, cumes, curvas de nível, etc
|
||||||
|
• Caminhos pedestres e ciclovias
|
||||||
|
• Pontos de interesse como restaurantes, estações de serviço, hotéis, lojas, atrações e muitos mais
|
||||||
|
• Pesquise por nome, endereço, ou por categoria de ponto de interesse
|
||||||
|
• Navegação com anúncios de voz ao caminhar, pedalar ou conduzir
|
||||||
|
• Marque os seus locais favoritos com um único clique
|
||||||
|
• Artigos da Wikipédia Offline
|
||||||
|
• Camada de metro e direções
|
||||||
|
• Gravação de Percursos
|
||||||
|
• Exportar e importar marcadores e percursos em formatos KML, KMZ, GPX
|
||||||
|
• Um modo escuro para usar durante a noite
|
||||||
|
• Melhore a informação do mapa para todos com um editor básico embebido
|
||||||
|
• Suporte para ‘Android Auto’
|
||||||
|
|
||||||
|
Por favor, reporte problemas da aplicação, sugira ideias e junte-se à nossa comunidade no website <b><i>comaps.app</i></b>.
|
||||||
|
|
||||||
|
<b>A liberdade chegou</b>
|
||||||
|
Descubra a sua jornada, navegue o mundo com privacidade e a comunidade à frente!
|
||||||
36
android/app/src/google/play/listings/sl/full-description.txt
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
Skupnostno vodena brezplačna in odprtokodna aplikacija za zemljevide, ki temelji na podatkih OpenStreetMap, ter je okrepljena z zavezanostjo k transparentnosti, zasebnosti, in ostajanju neprofitne organizacije.
|
||||||
|
|
||||||
|
Pridružite se skupnosti in pomagajte ustvariti najboljšo aplikacijo za zemljevide.
|
||||||
|
• Uporabljajte aplikacijo in jo priporočajte drugim.
|
||||||
|
• Podajte povratne informacije in poročajte o težavah.
|
||||||
|
• Posodobite podatke zemljevida v aplikaciji ali na spletni strani OpenStreetMap.
|
||||||
|
|
||||||
|
<i>Vaše povratne informacije in 5-zvezdične ocene so najboljša podpora za nas!</i>
|
||||||
|
|
||||||
|
‣ <b>Preprostost in izpopolnjenost</b>: bistvene, enostavne za uporabo funkcije, ki preprosto delujejo.
|
||||||
|
‣ <b>Osredotočena na delovanje brez internetne povezave</b>: načrtujte in navigirajte svoje potovanje v tujini brez potrebe po mobilni povezavi, iščite točke na poti med daljšo pohodniško turo, itd. Vse funkcije aplikacije so zasnovane za delovanje brez internetne povezave.
|
||||||
|
‣ <b>Spoštovanje zasebnosti</b>: aplikacija je zasnovana z mislijo na zasebnost – ne identificira ljudi, ne sledi in ne zbira osebnih podatkov. Brez oglasov.
|
||||||
|
‣ <b>Varčuje z baterijo in prostorom</b>: ne izčrpava baterije kot druge navigacijske aplikacije. Kompaktni zemljevidi varčujejo dragoceni prostor na vašem telefonu.
|
||||||
|
‣ <b>Brezplačna in ustvarjena s pomočjo skupnosti</b>: ljudje, kot ste vi, so pomagali ustvariti aplikacijo z dodajanjem krajev v OpenStreetMap, testiranjem in dajanjem povratnih informacij o funkcijah ter prispevanjem svojih razvojnih veščin in denarja.
|
||||||
|
‣ <b>Odprto in pregledno odločanje in finance, neprofitna in popolnoma odprtokodna aplikacija.
|
||||||
|
|
||||||
|
<b>Glavne značilnosti</b>:
|
||||||
|
• Podrobni zemljevidi z mesti, ki niso na voljo v Google Maps, ki jih lahko prenesete
|
||||||
|
• Način za uporabo na prostem z označenimi pohodniškimi potmi, kampi, vodnimi viri, vrhovi, višinskimi krivuljami itd.
|
||||||
|
• Pešpoti in kolesarske poti
|
||||||
|
• Zanimivosti, kot so restavracije, bencinske črpalke, hoteli, trgovine, znamenitosti in še veliko več
|
||||||
|
• Iskanje po imenu, naslovu ali kategoriji zanimivih točk
|
||||||
|
• Navigacija z glasovnimi napovedmi za hojo, kolesarjenje ali vožnjo
|
||||||
|
• Z enim dotikom dodajte svoje priljubljene kraje v zaznamke
|
||||||
|
• Članki iz Wikipedije za uporabo brez internetne povezave
|
||||||
|
• Plast podzemne železnice in navodila za pot
|
||||||
|
• Sledenje poti
|
||||||
|
• Izvoz in uvoz zaznamkov in poti v formatih KML, KMZ, GPX
|
||||||
|
• Temni način za uporabo ponoči
|
||||||
|
• Izboljšajte zemljevidne podatke za vse z uporabo vgrajenega osnovnega urejevalnika.
|
||||||
|
• Podpora za Android Auto.
|
||||||
|
|
||||||
|
Prijavite težave z aplikacijo, predlagajte ideje in se pridružite naši skupnosti na spletni strani <b><i>comaps.app</i></b>.
|
||||||
|
|
||||||
|
<b>Svoboda je tu</b>
|
||||||
|
Odkrijte svojo pot, raziskujte svet z zasebnostjo in skupnostjo v ospredju!
|
||||||
@@ -1 +1 @@
|
|||||||
Enostavna navigacija – Odkrij več o svojem potovanju – Podprto v skupnosti
|
Enostavno usmerjanje – Odkrij več o svojem potovanju – Podprto v skupnosti
|
||||||
|
|||||||
1
android/app/src/google/play/listings/sl/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
CoMaps - Usmerjajte zasebno
|
||||||
1
android/app/src/google/play/listings/sv-SE/title.txt
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Comaps- Navigera Privat
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
这是一个由社区主导、以 OpenStreetMap 数据为基础的免费开源地图应用,建立在我们对运营透明、隐私安全和非营利性的承诺之上。
|
这是一个由社区主导、以 OpenStreetMap 数据为基础的自由开源地图应用,建立在我们对运营透明、隐私安全和非营利性的承诺之上。
|
||||||
|
|
||||||
加入社区,和大家一起打造最优质的地图应用
|
加入社区,和大家一起打造最优质的地图应用
|
||||||
• 使用 CoMaps 的同时也分享推荐给周围的人
|
• 使用 CoMaps 的同时也分享推荐给周围的人
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
‣ <b>以提供离线服务为核心</b>:无需移动网络即可规划和导航您的海外旅行,郊外远足时仍可搜索航点等等。所有功能均可离线使用。
|
‣ <b>以提供离线服务为核心</b>:无需移动网络即可规划和导航您的海外旅行,郊外远足时仍可搜索航点等等。所有功能均可离线使用。
|
||||||
‣ <b>尊重隐私</b>:开发者们在设计 CoMaps 时,优先考虑的是保护用户隐私。CoMaps 无法识别用户身份、无法跟踪用户活动,也无法收集个人信息。此外,CoMaps 不会也不能显示任何广告。
|
‣ <b>尊重隐私</b>:开发者们在设计 CoMaps 时,优先考虑的是保护用户隐私。CoMaps 无法识别用户身份、无法跟踪用户活动,也无法收集个人信息。此外,CoMaps 不会也不能显示任何广告。
|
||||||
‣ <b>节省电池电量和空间</b>:不会像其他导航应用那样耗电。精简的地图可以节省宝贵的手机空间。
|
‣ <b>节省电池电量和空间</b>:不会像其他导航应用那样耗电。精简的地图可以节省宝贵的手机空间。
|
||||||
‣ <b>由社区合作创建的免费应用</b>:如同您一样的用户通过向 OpenStreetMap 添加地点、测试功能并提供反馈、无私地贡献自己的编程技能和资金,协力开发了 CoMaps。
|
‣ <b>自由且社区共建</b>:如同您一样的用户通过向 OpenStreetMap 添加地点、测试功能并提供反馈、无私地贡献自己的编程技能和资金,协力开发了 CoMaps。
|
||||||
‣ <b>决策问责、财务透明、非营利性、完全开源。</b>
|
‣ <b>决策问责、财务透明、非营利性、完全开源。</b>
|
||||||
|
|
||||||
<b>主要功能</b>:
|
<b>主要功能</b>:
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
• 地铁交通图层和路线指示
|
• 地铁交通图层和路线指示
|
||||||
• 轨迹记录
|
• 轨迹记录
|
||||||
• 以 KML、KMZ 和 GPX 格式导出和导入书签和轨迹
|
• 以 KML、KMZ 和 GPX 格式导出和导入书签和轨迹
|
||||||
• 选择天暗后自动开启的黑暗模式
|
• 深色模式,适配夜间使用场景
|
||||||
• 使用基本的内置编辑器来编辑 OpenStreetMap 地点,帮助大家改进地图数据
|
• 使用基本的内置编辑器来编辑 OpenStreetMap 地点,帮助大家改进地图数据
|
||||||
• 支持 Android Auto
|
• 支持 Android Auto
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,13 @@
|
|||||||
package app.organicmaps.background;
|
package app.organicmaps.background;
|
||||||
|
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
|
import android.os.Build;
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.work.Constraints;
|
import androidx.work.Constraints;
|
||||||
import androidx.work.ExistingWorkPolicy;
|
import androidx.work.ExistingWorkPolicy;
|
||||||
import androidx.work.NetworkType;
|
import androidx.work.NetworkType;
|
||||||
import androidx.work.OneTimeWorkRequest;
|
import androidx.work.OneTimeWorkRequest;
|
||||||
|
import androidx.work.OutOfQuotaPolicy;
|
||||||
import androidx.work.WorkManager;
|
import androidx.work.WorkManager;
|
||||||
import androidx.work.Worker;
|
import androidx.work.Worker;
|
||||||
import androidx.work.WorkerParameters;
|
import androidx.work.WorkerParameters;
|
||||||
@@ -35,7 +37,11 @@ public class OsmUploadWork extends Worker
|
|||||||
if (Editor.nativeHasSomethingToUpload() && OsmOAuth.isAuthorized())
|
if (Editor.nativeHasSomethingToUpload() && OsmOAuth.isAuthorized())
|
||||||
{
|
{
|
||||||
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
|
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).build();
|
||||||
final OneTimeWorkRequest wr = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c).build();
|
OneTimeWorkRequest.Builder builder = new OneTimeWorkRequest.Builder(OsmUploadWork.class).setConstraints(c);
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
builder.setExpedited(OutOfQuotaPolicy.RUN_AS_NON_EXPEDITED_WORK_REQUEST);
|
||||||
|
}
|
||||||
|
final OneTimeWorkRequest wr = builder.build();
|
||||||
WorkManager.getInstance(context).beginUniqueWork("UploadOsmChanges", ExistingWorkPolicy.KEEP, wr).enqueue();
|
WorkManager.getInstance(context).beginUniqueWork("UploadOsmChanges", ExistingWorkPolicy.KEEP, wr).enqueue();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,15 +7,9 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StyleRes;
|
import androidx.annotation.StyleRes;
|
||||||
import androidx.fragment.app.DialogFragment;
|
import androidx.fragment.app.DialogFragment;
|
||||||
import app.organicmaps.R;
|
|
||||||
|
|
||||||
public class BaseMwmDialogFragment extends DialogFragment
|
public class BaseMwmDialogFragment extends DialogFragment
|
||||||
{
|
{
|
||||||
@StyleRes
|
|
||||||
protected final int getFullscreenTheme()
|
|
||||||
{
|
|
||||||
return R.style.MwmTheme_DialogFragment_Fullscreen;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected int getStyle()
|
protected int getStyle()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -188,7 +188,7 @@ public class BookmarkCategoriesFragment extends BaseMwmRecyclerFragment<Bookmark
|
|||||||
ArrayList<MenuBottomSheetItem> items = new ArrayList<>();
|
ArrayList<MenuBottomSheetItem> items = new ArrayList<>();
|
||||||
if (mSelectedCategory != null)
|
if (mSelectedCategory != null)
|
||||||
{
|
{
|
||||||
items.add(new MenuBottomSheetItem(R.string.edit, R.drawable.ic_settings,
|
items.add(new MenuBottomSheetItem(R.string.edit, R.drawable.ic_edit,
|
||||||
() -> onSettingsActionSelected(mSelectedCategory)));
|
() -> onSettingsActionSelected(mSelectedCategory)));
|
||||||
items.add(new MenuBottomSheetItem(mSelectedCategory.isVisible() ? R.string.hide : R.string.show,
|
items.add(new MenuBottomSheetItem(mSelectedCategory.isVisible() ? R.string.hide : R.string.show,
|
||||||
mSelectedCategory.isVisible() ? R.drawable.ic_hide : R.drawable.ic_show,
|
mSelectedCategory.isVisible() ? R.drawable.ic_hide : R.drawable.ic_show,
|
||||||
|
|||||||
@@ -466,12 +466,10 @@ public class BookmarkListAdapter extends RecyclerView.Adapter<Holders.BaseBookma
|
|||||||
View desc = inflater.inflate(R.layout.item_category_description, parent, false);
|
View desc = inflater.inflate(R.layout.item_category_description, parent, false);
|
||||||
MaterialTextView moreBtn = desc.findViewById(R.id.more_btn);
|
MaterialTextView moreBtn = desc.findViewById(R.id.more_btn);
|
||||||
MaterialTextView text = desc.findViewById(R.id.text);
|
MaterialTextView text = desc.findViewById(R.id.text);
|
||||||
MaterialTextView title = desc.findViewById(R.id.title);
|
|
||||||
setMoreButtonVisibility(text, moreBtn);
|
setMoreButtonVisibility(text, moreBtn);
|
||||||
holder = new Holders.DescriptionViewHolder(desc, mSectionsDataSource.getCategory());
|
holder = new Holders.DescriptionViewHolder(desc, mSectionsDataSource.getCategory());
|
||||||
text.setOnClickListener(v -> onMoreButtonClicked(text, moreBtn));
|
text.setOnClickListener(v -> onMoreButtonClicked(text, moreBtn));
|
||||||
moreBtn.setOnClickListener(v -> onMoreButtonClicked(text, moreBtn));
|
moreBtn.setOnClickListener(v -> onMoreButtonClicked(text, moreBtn));
|
||||||
title.setOnClickListener(v -> onMoreButtonClicked(text, moreBtn));
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -282,11 +282,11 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||||||
{
|
{
|
||||||
if (isEmptySearchResults())
|
if (isEmptySearchResults())
|
||||||
{
|
{
|
||||||
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query);
|
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||||
}
|
}
|
||||||
else if (isEmpty())
|
else if (isEmpty())
|
||||||
{
|
{
|
||||||
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message);
|
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message, R.drawable.ic_bookmarks);
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean isEmptyRecycler = isEmpty() || isEmptySearchResults();
|
boolean isEmptyRecycler = isEmpty() || isEmptySearchResults();
|
||||||
@@ -771,7 +771,7 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
|||||||
items.add(new MenuBottomSheetItem(R.string.export_file_gpx, R.drawable.ic_file_gpx,
|
items.add(new MenuBottomSheetItem(R.string.export_file_gpx, R.drawable.ic_file_gpx,
|
||||||
() -> onShareOptionSelected(KmlFileType.Gpx)));
|
() -> onShareOptionSelected(KmlFileType.Gpx)));
|
||||||
}
|
}
|
||||||
items.add(new MenuBottomSheetItem(R.string.edit, R.drawable.ic_settings, this::onSettingsOptionSelected));
|
items.add(new MenuBottomSheetItem(R.string.edit, R.drawable.ic_edit, this::onSettingsOptionSelected));
|
||||||
if (!isLastOwnedCategory())
|
if (!isLastOwnedCategory())
|
||||||
items.add(new MenuBottomSheetItem(R.string.delete_list, R.drawable.ic_delete, this::onDeleteOptionSelected));
|
items.add(new MenuBottomSheetItem(R.string.delete_list, R.drawable.ic_delete, this::onDeleteOptionSelected));
|
||||||
return items;
|
return items;
|
||||||
|
|||||||
@@ -438,21 +438,17 @@ public class Holders
|
|||||||
static final float SPACING_MULTIPLE = 1.0f;
|
static final float SPACING_MULTIPLE = 1.0f;
|
||||||
static final float SPACING_ADD = 0.0f;
|
static final float SPACING_ADD = 0.0f;
|
||||||
@NonNull
|
@NonNull
|
||||||
private final MaterialTextView mTitle;
|
|
||||||
@NonNull
|
|
||||||
private final MaterialTextView mDescText;
|
private final MaterialTextView mDescText;
|
||||||
|
|
||||||
DescriptionViewHolder(@NonNull View itemView, @NonNull BookmarkCategory category)
|
DescriptionViewHolder(@NonNull View itemView, @NonNull BookmarkCategory category)
|
||||||
{
|
{
|
||||||
super(itemView);
|
super(itemView);
|
||||||
mDescText = itemView.findViewById(R.id.text);
|
mDescText = itemView.findViewById(R.id.text);
|
||||||
mTitle = itemView.findViewById(R.id.title);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
void bind(@NonNull SectionPosition position, @NonNull BookmarkListAdapter.SectionsDataSource sectionsDataSource)
|
void bind(@NonNull SectionPosition position, @NonNull BookmarkListAdapter.SectionsDataSource sectionsDataSource)
|
||||||
{
|
{
|
||||||
mTitle.setText(sectionsDataSource.getCategory().getName());
|
|
||||||
bindDescription(sectionsDataSource.getCategory());
|
bindDescription(sectionsDataSource.getCategory());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -462,9 +458,12 @@ public class Holders
|
|||||||
|
|
||||||
String formattedDesc = desc.replace("\n", "<br>");
|
String formattedDesc = desc.replace("\n", "<br>");
|
||||||
Spanned spannedDesc = Utils.fromHtml(formattedDesc);
|
Spanned spannedDesc = Utils.fromHtml(formattedDesc);
|
||||||
|
if (!TextUtils.isEmpty(spannedDesc)) {
|
||||||
mDescText.setText(spannedDesc);
|
mDescText.setText(spannedDesc);
|
||||||
|
}
|
||||||
UiUtils.showIf(!TextUtils.isEmpty(spannedDesc), mDescText);
|
else {
|
||||||
|
mDescText.setText(R.string.list_description_empty);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ public class DrivingOptionsScreen extends BaseMapScreen
|
|||||||
new DrivingOption(RoadType.Dirty, R.string.avoid_unpaved),
|
new DrivingOption(RoadType.Dirty, R.string.avoid_unpaved),
|
||||||
new DrivingOption(RoadType.Ferry, R.string.avoid_ferry),
|
new DrivingOption(RoadType.Ferry, R.string.avoid_ferry),
|
||||||
new DrivingOption(RoadType.Motorway, R.string.avoid_motorways),
|
new DrivingOption(RoadType.Motorway, R.string.avoid_motorways),
|
||||||
new DrivingOption(RoadType.Steps, R.string.avoid_steps)};
|
new DrivingOption(RoadType.Steps, R.string.avoid_steps),
|
||||||
|
new DrivingOption(RoadType.Paved, R.string.avoid_paved)};
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
private final Map<RoadType, Boolean> mInitialDrivingOptionsState = new HashMap<>();
|
private final Map<RoadType, Boolean> mInitialDrivingOptionsState = new HashMap<>();
|
||||||
|
|||||||
@@ -222,10 +222,10 @@ public class DownloaderFragment
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (mAdapter != null && mAdapter.isSearchResultsMode())
|
if (mAdapter != null && mAdapter.isSearchResultsMode())
|
||||||
placeholder.setContent(R.string.search_not_found, R.string.search_not_found_query);
|
placeholder.setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||||
else
|
else
|
||||||
placeholder.setContent(R.string.downloader_no_downloaded_maps_title,
|
placeholder.setContent(R.string.downloader_no_downloaded_maps_title,
|
||||||
R.string.downloader_no_downloaded_maps_message);
|
R.string.downloader_no_downloaded_maps_message, R.drawable.ic_download);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -352,7 +352,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
|||||||
{
|
{
|
||||||
hasChargeSockets = hasChargeSockets || (type == Metadata.MetadataType.FMD_CHARGE_SOCKETS.toInt());
|
hasChargeSockets = hasChargeSockets || (type == Metadata.MetadataType.FMD_CHARGE_SOCKETS.toInt());
|
||||||
}
|
}
|
||||||
UiUtils.showIf(hasChargeSockets, mCardChargingStation);
|
// Hide socket until https://codeberg.org/comaps/comaps/issues/2368 is fixed
|
||||||
|
//UiUtils.showIf(hasChargeSockets, mCardChargingStation);
|
||||||
|
|
||||||
setCardVisibility(mCardDetails, mDetailsBlocks, editableDetails);
|
setCardVisibility(mCardDetails, mDetailsBlocks, editableDetails);
|
||||||
setCardVisibility(mCardSocialMedia, mSocialMediaBlocks, editableDetails);
|
setCardVisibility(mCardSocialMedia, mSocialMediaBlocks, editableDetails);
|
||||||
|
|||||||
@@ -0,0 +1,208 @@
|
|||||||
|
package app.organicmaps.editor;
|
||||||
|
|
||||||
|
import android.content.res.Configuration;
|
||||||
|
import android.content.res.Resources;
|
||||||
|
|
||||||
|
import androidx.annotation.NonNull;
|
||||||
|
import androidx.annotation.Nullable;
|
||||||
|
import androidx.fragment.app.Fragment;
|
||||||
|
import androidx.fragment.app.FragmentActivity;
|
||||||
|
import androidx.fragment.app.FragmentManager;
|
||||||
|
|
||||||
|
import com.google.android.material.timepicker.MaterialTimePicker;
|
||||||
|
import com.google.android.material.timepicker.TimeFormat;
|
||||||
|
|
||||||
|
import app.organicmaps.R;
|
||||||
|
import app.organicmaps.sdk.editor.data.HoursMinutes;
|
||||||
|
import app.organicmaps.sdk.util.DateUtils;
|
||||||
|
|
||||||
|
public class FromToTimePicker
|
||||||
|
{
|
||||||
|
private final FragmentActivity mActivity;
|
||||||
|
private final FragmentManager mFragmentManager;
|
||||||
|
private final OnPickListener mListener;
|
||||||
|
private final int mId;
|
||||||
|
private final boolean mIs24HourFormat;
|
||||||
|
private final Resources mResources;
|
||||||
|
|
||||||
|
private HoursMinutes mFromTime;
|
||||||
|
private HoursMinutes mToTime;
|
||||||
|
private MaterialTimePicker mToTimePicker;
|
||||||
|
private MaterialTimePicker mFromTimePicker;
|
||||||
|
private boolean mIsFromTimePicked;
|
||||||
|
private int mInputMode;
|
||||||
|
|
||||||
|
public static void pickTime(@NonNull Fragment fragment,
|
||||||
|
@NonNull FromToTimePicker.OnPickListener listener,
|
||||||
|
@NonNull HoursMinutes fromTime,
|
||||||
|
@NonNull HoursMinutes toTime,
|
||||||
|
int id,
|
||||||
|
boolean startWithToTime)
|
||||||
|
{
|
||||||
|
FromToTimePicker timePicker = new FromToTimePicker(fragment,
|
||||||
|
listener,
|
||||||
|
fromTime,
|
||||||
|
toTime,
|
||||||
|
id);
|
||||||
|
|
||||||
|
if (startWithToTime)
|
||||||
|
timePicker.showToTimePicker();
|
||||||
|
else
|
||||||
|
timePicker.showFromTimePicker();
|
||||||
|
}
|
||||||
|
|
||||||
|
private FromToTimePicker(@NonNull Fragment fragment,
|
||||||
|
@NonNull FromToTimePicker.OnPickListener listener,
|
||||||
|
@NonNull HoursMinutes fromTime,
|
||||||
|
@NonNull HoursMinutes toTime,
|
||||||
|
int id)
|
||||||
|
{
|
||||||
|
mActivity = fragment.requireActivity();
|
||||||
|
mFragmentManager = fragment.getChildFragmentManager();
|
||||||
|
mListener = listener;
|
||||||
|
mFromTime = fromTime;
|
||||||
|
mToTime = toTime;
|
||||||
|
mId = id;
|
||||||
|
|
||||||
|
mIsFromTimePicked = false;
|
||||||
|
mInputMode = MaterialTimePicker.INPUT_MODE_CLOCK;
|
||||||
|
|
||||||
|
mIs24HourFormat = DateUtils.is24HourFormat(mActivity);
|
||||||
|
mResources = mActivity.getResources();
|
||||||
|
|
||||||
|
mActivity.addOnConfigurationChangedListener(this::handleConfigurationChanged);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showFromTimePicker()
|
||||||
|
{
|
||||||
|
if (mFromTimePicker != null)
|
||||||
|
{
|
||||||
|
saveState(mFromTimePicker, true);
|
||||||
|
mFromTimePicker.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
mFromTimePicker = buildFromTimePicker();
|
||||||
|
mFromTimePicker.show(mFragmentManager, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void showToTimePicker()
|
||||||
|
{
|
||||||
|
if (mToTimePicker != null)
|
||||||
|
{
|
||||||
|
saveState(mToTimePicker, false);
|
||||||
|
mToTimePicker.dismiss();
|
||||||
|
}
|
||||||
|
|
||||||
|
mToTimePicker = buildToTimePicker();
|
||||||
|
|
||||||
|
mToTimePicker.show(mFragmentManager, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
private MaterialTimePicker buildFromTimePicker()
|
||||||
|
{
|
||||||
|
MaterialTimePicker timePicker = buildTimePicker(mFromTime,
|
||||||
|
mResources.getString(R.string.editor_time_from),
|
||||||
|
mResources.getString(R.string.next_button),
|
||||||
|
null);
|
||||||
|
|
||||||
|
timePicker.addOnNegativeButtonClickListener(view -> finishTimePicking(false));
|
||||||
|
|
||||||
|
timePicker.addOnPositiveButtonClickListener(view ->
|
||||||
|
{
|
||||||
|
mIsFromTimePicked = true;
|
||||||
|
saveState(timePicker, true);
|
||||||
|
mFromTimePicker = null;
|
||||||
|
showToTimePicker();
|
||||||
|
});
|
||||||
|
|
||||||
|
timePicker.addOnCancelListener(view -> finishTimePicking(false));
|
||||||
|
|
||||||
|
return timePicker;
|
||||||
|
}
|
||||||
|
|
||||||
|
private MaterialTimePicker buildToTimePicker()
|
||||||
|
{
|
||||||
|
MaterialTimePicker timePicker = buildTimePicker(mToTime,
|
||||||
|
mResources.getString(R.string.editor_time_to),
|
||||||
|
null,
|
||||||
|
mResources.getString(R.string.back));
|
||||||
|
|
||||||
|
timePicker.addOnNegativeButtonClickListener(view ->
|
||||||
|
{
|
||||||
|
saveState(timePicker, false);
|
||||||
|
mToTimePicker = null;
|
||||||
|
if (mIsFromTimePicked)
|
||||||
|
showFromTimePicker();
|
||||||
|
else
|
||||||
|
finishTimePicking(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
timePicker.addOnPositiveButtonClickListener(view ->
|
||||||
|
{
|
||||||
|
saveState(timePicker, false);
|
||||||
|
finishTimePicking(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
timePicker.addOnCancelListener(view -> finishTimePicking(false));
|
||||||
|
|
||||||
|
return timePicker;
|
||||||
|
}
|
||||||
|
|
||||||
|
@NonNull
|
||||||
|
private MaterialTimePicker buildTimePicker(@NonNull HoursMinutes time,
|
||||||
|
@NonNull String title,
|
||||||
|
@Nullable String positiveButtonTextOverride,
|
||||||
|
@Nullable String negativeButtonTextOverride)
|
||||||
|
{
|
||||||
|
MaterialTimePicker.Builder builder = new MaterialTimePicker.Builder()
|
||||||
|
.setTitleText(title)
|
||||||
|
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
|
||||||
|
.setInputMode(mInputMode)
|
||||||
|
.setTheme(R.style.MwmMain_MaterialTimePicker)
|
||||||
|
.setHour((int) time.hours)
|
||||||
|
.setMinute((int) time.minutes);
|
||||||
|
|
||||||
|
if (positiveButtonTextOverride != null)
|
||||||
|
builder.setPositiveButtonText(positiveButtonTextOverride);
|
||||||
|
|
||||||
|
if (negativeButtonTextOverride != null)
|
||||||
|
builder.setNegativeButtonText(negativeButtonTextOverride);
|
||||||
|
|
||||||
|
return builder.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void saveState(@NonNull MaterialTimePicker timePicker, boolean isFromTime)
|
||||||
|
{
|
||||||
|
mInputMode = timePicker.getInputMode();
|
||||||
|
if (isFromTime)
|
||||||
|
mFromTime = getHoursMinutes(timePicker);
|
||||||
|
else
|
||||||
|
mToTime = getHoursMinutes(timePicker);
|
||||||
|
}
|
||||||
|
|
||||||
|
private HoursMinutes getHoursMinutes(@NonNull MaterialTimePicker timePicker)
|
||||||
|
{
|
||||||
|
return new HoursMinutes(timePicker.getHour(), timePicker.getMinute(), mIs24HourFormat);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void finishTimePicking(boolean isConfirmed)
|
||||||
|
{
|
||||||
|
mActivity.removeOnConfigurationChangedListener(this::handleConfigurationChanged);
|
||||||
|
|
||||||
|
if (isConfirmed)
|
||||||
|
mListener.onHoursMinutesPicked(mFromTime, mToTime, mId);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void handleConfigurationChanged(Configuration configuration)
|
||||||
|
{
|
||||||
|
if (mFromTimePicker != null && mFromTimePicker.isVisible())
|
||||||
|
showFromTimePicker();
|
||||||
|
else if (mToTimePicker != null && mToTimePicker.isVisible())
|
||||||
|
showToTimePicker();
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface OnPickListener
|
||||||
|
{
|
||||||
|
void onHoursMinutesPicked(HoursMinutes from, HoursMinutes to, int id);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,211 +0,0 @@
|
|||||||
package app.organicmaps.editor;
|
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
|
||||||
import android.app.Dialog;
|
|
||||||
import android.content.Context;
|
|
||||||
import android.content.res.ColorStateList;
|
|
||||||
import android.os.Bundle;
|
|
||||||
import android.text.format.DateFormat;
|
|
||||||
import android.view.LayoutInflater;
|
|
||||||
import android.view.View;
|
|
||||||
import android.widget.Button;
|
|
||||||
import android.widget.TextView;
|
|
||||||
import android.widget.TimePicker;
|
|
||||||
import androidx.annotation.IntRange;
|
|
||||||
import androidx.annotation.NonNull;
|
|
||||||
import androidx.appcompat.app.AlertDialog;
|
|
||||||
import androidx.appcompat.content.res.AppCompatResources;
|
|
||||||
import androidx.fragment.app.FragmentManager;
|
|
||||||
import app.organicmaps.R;
|
|
||||||
import app.organicmaps.base.BaseMwmDialogFragment;
|
|
||||||
import app.organicmaps.sdk.editor.data.HoursMinutes;
|
|
||||||
import app.organicmaps.sdk.util.DateUtils;
|
|
||||||
import app.organicmaps.util.Utils;
|
|
||||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
|
||||||
import com.google.android.material.tabs.TabLayout;
|
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
|
||||||
|
|
||||||
public class HoursMinutesPickerFragment extends BaseMwmDialogFragment
|
|
||||||
{
|
|
||||||
private static final String EXTRA_FROM = "HoursMinutesFrom";
|
|
||||||
private static final String EXTRA_TO = "HoursMinutesTo";
|
|
||||||
private static final String EXTRA_SELECT_FIRST = "SelectedTab";
|
|
||||||
private static final String EXTRA_ID = "Id";
|
|
||||||
|
|
||||||
public static final int TAB_FROM = 0;
|
|
||||||
public static final int TAB_TO = 1;
|
|
||||||
|
|
||||||
private HoursMinutes mFrom;
|
|
||||||
private HoursMinutes mTo;
|
|
||||||
|
|
||||||
private TimePicker mPicker;
|
|
||||||
private View mPickerHoursLabel;
|
|
||||||
|
|
||||||
@IntRange(from = 0, to = 1)
|
|
||||||
private int mSelectedTab;
|
|
||||||
private TabLayout mTabs;
|
|
||||||
|
|
||||||
private int mId;
|
|
||||||
private Button mOkButton;
|
|
||||||
|
|
||||||
public interface OnPickListener
|
|
||||||
{
|
|
||||||
void onHoursMinutesPicked(HoursMinutes from, HoursMinutes to, int id);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void pick(Context context, FragmentManager manager, @NonNull HoursMinutes from,
|
|
||||||
@NonNull HoursMinutes to, @IntRange(from = 0, to = 1) int selectedPosition, int id)
|
|
||||||
{
|
|
||||||
final Bundle args = new Bundle();
|
|
||||||
args.putParcelable(EXTRA_FROM, from);
|
|
||||||
args.putParcelable(EXTRA_TO, to);
|
|
||||||
args.putInt(EXTRA_SELECT_FIRST, selectedPosition);
|
|
||||||
args.putInt(EXTRA_ID, id);
|
|
||||||
|
|
||||||
final HoursMinutesPickerFragment fragment = (HoursMinutesPickerFragment) manager.getFragmentFactory().instantiate(
|
|
||||||
context.getClassLoader(), HoursMinutesPickerFragment.class.getName());
|
|
||||||
fragment.setArguments(args);
|
|
||||||
fragment.show(manager, null);
|
|
||||||
}
|
|
||||||
|
|
||||||
@NonNull
|
|
||||||
@Override
|
|
||||||
public Dialog onCreateDialog(Bundle savedInstanceState)
|
|
||||||
{
|
|
||||||
readArgs();
|
|
||||||
final View root = createView();
|
|
||||||
// noinspection ConstantConditions
|
|
||||||
mTabs.getTabAt(mSelectedTab).select();
|
|
||||||
|
|
||||||
final AlertDialog dialog =
|
|
||||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmMain_DialogFragment_TimePicker)
|
|
||||||
.setView(root)
|
|
||||||
.setNegativeButton(R.string.cancel, null)
|
|
||||||
.setPositiveButton(R.string.ok, null)
|
|
||||||
.setCancelable(true)
|
|
||||||
.create();
|
|
||||||
|
|
||||||
dialog.setOnShowListener(dialogInterface -> {
|
|
||||||
mOkButton = dialog.getButton(AlertDialog.BUTTON_POSITIVE);
|
|
||||||
mOkButton.setOnClickListener(v -> {
|
|
||||||
if (mSelectedTab == TAB_FROM)
|
|
||||||
{
|
|
||||||
// noinspection ConstantConditions
|
|
||||||
mTabs.getTabAt(TAB_TO).select();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
saveHoursMinutes();
|
|
||||||
dismiss();
|
|
||||||
if (getParentFragment() instanceof OnPickListener)
|
|
||||||
((OnPickListener) getParentFragment()).onHoursMinutesPicked(mFrom, mTo, mId);
|
|
||||||
});
|
|
||||||
refreshPicker();
|
|
||||||
});
|
|
||||||
|
|
||||||
return dialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void readArgs()
|
|
||||||
{
|
|
||||||
final Bundle args = getArguments();
|
|
||||||
if (args == null)
|
|
||||||
throw new IllegalArgumentException("Args must not be null");
|
|
||||||
mFrom = Utils.getParcelable(args, EXTRA_FROM, HoursMinutes.class);
|
|
||||||
mTo = Utils.getParcelable(args, EXTRA_TO, HoursMinutes.class);
|
|
||||||
mSelectedTab = args.getInt(EXTRA_SELECT_FIRST);
|
|
||||||
mId = args.getInt(EXTRA_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
private View createView()
|
|
||||||
{
|
|
||||||
final LayoutInflater inflater = LayoutInflater.from(requireActivity());
|
|
||||||
@SuppressLint("InflateParams")
|
|
||||||
final View root = inflater.inflate(R.layout.fragment_timetable_picker, null);
|
|
||||||
|
|
||||||
mPicker = root.findViewById(R.id.picker);
|
|
||||||
mPicker.setIs24HourView(DateFormat.is24HourFormat(requireActivity()));
|
|
||||||
@SuppressLint("DiscouragedApi")
|
|
||||||
int id = getResources().getIdentifier("hours", "id", "android");
|
|
||||||
if (id != 0)
|
|
||||||
{
|
|
||||||
mPickerHoursLabel = mPicker.findViewById(id);
|
|
||||||
if (!(mPickerHoursLabel instanceof TextView))
|
|
||||||
mPickerHoursLabel = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
mTabs = root.findViewById(R.id.tabs);
|
|
||||||
MaterialTextView tabView = (MaterialTextView) inflater.inflate(R.layout.tab_timepicker, mTabs, false);
|
|
||||||
tabView.setText(getResources().getString(R.string.editor_time_from));
|
|
||||||
final ColorStateList textColor =
|
|
||||||
AppCompatResources.getColorStateList(requireContext(), R.color.accent_color_selector);
|
|
||||||
tabView.setTextColor(textColor);
|
|
||||||
mTabs.addTab(mTabs.newTab().setCustomView(tabView), true);
|
|
||||||
tabView = (MaterialTextView) inflater.inflate(R.layout.tab_timepicker, mTabs, false);
|
|
||||||
tabView.setText(getResources().getString(R.string.editor_time_to));
|
|
||||||
tabView.setTextColor(textColor);
|
|
||||||
mTabs.addTab(mTabs.newTab().setCustomView(tabView), true);
|
|
||||||
mTabs.addOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
|
|
||||||
@Override
|
|
||||||
public void onTabSelected(TabLayout.Tab tab)
|
|
||||||
{
|
|
||||||
if (!isInit())
|
|
||||||
return;
|
|
||||||
|
|
||||||
saveHoursMinutes();
|
|
||||||
mSelectedTab = tab.getPosition();
|
|
||||||
refreshPicker();
|
|
||||||
if (mPickerHoursLabel != null)
|
|
||||||
mPickerHoursLabel.performClick();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTabUnselected(TabLayout.Tab tab)
|
|
||||||
{}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onTabReselected(TabLayout.Tab tab)
|
|
||||||
{}
|
|
||||||
});
|
|
||||||
|
|
||||||
return root;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void saveHoursMinutes()
|
|
||||||
{
|
|
||||||
boolean is24HourFormat = DateUtils.is24HourFormat(requireContext());
|
|
||||||
final HoursMinutes hoursMinutes =
|
|
||||||
new HoursMinutes(mPicker.getCurrentHour(), mPicker.getCurrentMinute(), is24HourFormat);
|
|
||||||
if (mSelectedTab == TAB_FROM)
|
|
||||||
mFrom = hoursMinutes;
|
|
||||||
else
|
|
||||||
mTo = hoursMinutes;
|
|
||||||
}
|
|
||||||
|
|
||||||
private boolean isInit()
|
|
||||||
{
|
|
||||||
return mOkButton != null && mPicker != null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void refreshPicker()
|
|
||||||
{
|
|
||||||
if (!isInit())
|
|
||||||
return;
|
|
||||||
|
|
||||||
HoursMinutes hoursMinutes;
|
|
||||||
int okBtnRes;
|
|
||||||
if (mSelectedTab == TAB_FROM)
|
|
||||||
{
|
|
||||||
hoursMinutes = mFrom;
|
|
||||||
okBtnRes = R.string.next_button;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hoursMinutes = mTo;
|
|
||||||
okBtnRes = R.string.ok;
|
|
||||||
}
|
|
||||||
mPicker.setCurrentMinute((int) hoursMinutes.minutes);
|
|
||||||
mPicker.setCurrentHour((int) hoursMinutes.hours);
|
|
||||||
mOkButton.setText(okBtnRes);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -113,9 +113,6 @@ public class PhoneListAdapter extends RecyclerView.Adapter<PhoneListAdapter.View
|
|||||||
|
|
||||||
deleteButton = itemView.findViewById(R.id.delete_icon);
|
deleteButton = itemView.findViewById(R.id.delete_icon);
|
||||||
deleteButton.setOnClickListener(this);
|
deleteButton.setOnClickListener(this);
|
||||||
// TODO: setting icons from code because icons defined in layout XML are white.
|
|
||||||
deleteButton.setImageResource(R.drawable.ic_delete);
|
|
||||||
((ShapeableImageView) itemView.findViewById(R.id.phone_icon)).setImageResource(R.drawable.ic_phone);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPosition(int position)
|
public void setPosition(int position)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import android.view.View;
|
|||||||
import android.view.ViewGroup;
|
import android.view.ViewGroup;
|
||||||
import android.widget.CompoundButton;
|
import android.widget.CompoundButton;
|
||||||
import android.widget.LinearLayout;
|
import android.widget.LinearLayout;
|
||||||
|
|
||||||
import androidx.annotation.IdRes;
|
import androidx.annotation.IdRes;
|
||||||
import androidx.annotation.IntRange;
|
import androidx.annotation.IntRange;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
@@ -29,13 +30,13 @@ import java.util.Calendar;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter.BaseTimetableViewHolder>
|
class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter.BaseTimetableViewHolder>
|
||||||
implements HoursMinutesPickerFragment.OnPickListener, TimetableProvider
|
implements FromToTimePicker.OnPickListener, TimetableProvider
|
||||||
{
|
{
|
||||||
private static final int TYPE_TIMETABLE = 0;
|
private static final int TYPE_TIMETABLE = 0;
|
||||||
private static final int TYPE_ADD_TIMETABLE = 1;
|
private static final int TYPE_ADD_TIMETABLE = 1;
|
||||||
|
|
||||||
private static final int ID_OPENING = 0;
|
private static final int ID_OPENING_TIME = 0;
|
||||||
private static final int ID_CLOSING = 1;
|
private static final int ID_CLOSED_SPAN = 1;
|
||||||
|
|
||||||
private static final int[] DAYS = {R.id.day1, R.id.day2, R.id.day3, R.id.day4, R.id.day5, R.id.day6, R.id.day7};
|
private static final int[] DAYS = {R.id.day1, R.id.day2, R.id.day3, R.id.day4, R.id.day5, R.id.day6, R.id.day7};
|
||||||
|
|
||||||
@@ -69,7 +70,7 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
@Override
|
@Override
|
||||||
public String getTimetables()
|
public String getTimetables()
|
||||||
{
|
{
|
||||||
return OpeningHours.nativeTimetablesToString(mItems.toArray(new Timetable[mItems.size()]));
|
return OpeningHours.nativeTimetablesToString(mItems.toArray(new Timetable[0]));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -101,7 +102,7 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
|
|
||||||
private void addTimetable()
|
private void addTimetable()
|
||||||
{
|
{
|
||||||
mItems.add(OpeningHours.nativeGetComplementTimetable(mItems.toArray(new Timetable[mItems.size()])));
|
mItems.add(OpeningHours.nativeGetComplementTimetable(mItems.toArray(new Timetable[0])));
|
||||||
notifyItemInserted(mItems.size() - 1);
|
notifyItemInserted(mItems.size() - 1);
|
||||||
refreshComplement();
|
refreshComplement();
|
||||||
}
|
}
|
||||||
@@ -115,25 +116,31 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
|
|
||||||
private void refreshComplement()
|
private void refreshComplement()
|
||||||
{
|
{
|
||||||
mComplementItem = OpeningHours.nativeGetComplementTimetable(mItems.toArray(new Timetable[mItems.size()]));
|
mComplementItem = OpeningHours.nativeGetComplementTimetable(mItems.toArray(new Timetable[0]));
|
||||||
notifyItemChanged(getItemCount() - 1);
|
notifyItemChanged(getItemCount() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void pickTime(int position,
|
private void pickTime(int position,
|
||||||
@IntRange(from = HoursMinutesPickerFragment.TAB_FROM, to = HoursMinutesPickerFragment.TAB_TO)
|
@IntRange(from = ID_OPENING_TIME, to = ID_CLOSED_SPAN) int id,
|
||||||
int tab, @IntRange(from = ID_OPENING, to = ID_CLOSING) int id)
|
boolean startWithToTime)
|
||||||
{
|
{
|
||||||
final Timetable data = mItems.get(position);
|
final Timetable data = mItems.get(position);
|
||||||
mPickingPosition = position;
|
mPickingPosition = position;
|
||||||
HoursMinutesPickerFragment.pick(mFragment.requireActivity(), mFragment.getChildFragmentManager(),
|
|
||||||
data.workingTimespan.start, data.workingTimespan.end, tab, id);
|
FromToTimePicker.pickTime(mFragment,
|
||||||
|
this,
|
||||||
|
data.workingTimespan.start,
|
||||||
|
data.workingTimespan.end,
|
||||||
|
id,
|
||||||
|
startWithToTime);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onHoursMinutesPicked(HoursMinutes from, HoursMinutes to, int id)
|
public void onHoursMinutesPicked(HoursMinutes from, HoursMinutes to, int id)
|
||||||
{
|
{
|
||||||
final Timetable item = mItems.get(mPickingPosition);
|
final Timetable item = mItems.get(mPickingPosition);
|
||||||
if (id == ID_OPENING)
|
if (id == ID_OPENING_TIME)
|
||||||
mItems.set(mPickingPosition, OpeningHours.nativeSetOpeningTime(item, new Timespan(from, to)));
|
mItems.set(mPickingPosition, OpeningHours.nativeSetOpeningTime(item, new Timespan(from, to)));
|
||||||
else
|
else
|
||||||
mItems.set(mPickingPosition, OpeningHours.nativeAddClosedSpan(item, new Timespan(from, to)));
|
mItems.set(mPickingPosition, OpeningHours.nativeAddClosedSpan(item, new Timespan(from, to)));
|
||||||
@@ -148,7 +155,7 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
|
|
||||||
private void addWorkingDay(int day, int position)
|
private void addWorkingDay(int day, int position)
|
||||||
{
|
{
|
||||||
final Timetable[] tts = mItems.toArray(new Timetable[mItems.size()]);
|
final Timetable[] tts = mItems.toArray(new Timetable[0]);
|
||||||
mItems = new ArrayList<>(Arrays.asList(OpeningHours.nativeAddWorkingDay(tts, position, day)));
|
mItems = new ArrayList<>(Arrays.asList(OpeningHours.nativeAddWorkingDay(tts, position, day)));
|
||||||
refreshComplement();
|
refreshComplement();
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
@@ -156,7 +163,7 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
|
|
||||||
private void removeWorkingDay(int day, int position)
|
private void removeWorkingDay(int day, int position)
|
||||||
{
|
{
|
||||||
final Timetable[] tts = mItems.toArray(new Timetable[mItems.size()]);
|
final Timetable[] tts = mItems.toArray(new Timetable[0]);
|
||||||
mItems = new ArrayList<>(Arrays.asList(OpeningHours.nativeRemoveWorkingDay(tts, position, day)));
|
mItems = new ArrayList<>(Arrays.asList(OpeningHours.nativeRemoveWorkingDay(tts, position, day)));
|
||||||
refreshComplement();
|
refreshComplement();
|
||||||
notifyDataSetChanged();
|
notifyDataSetChanged();
|
||||||
@@ -262,13 +269,13 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
|||||||
{
|
{
|
||||||
final int id = v.getId();
|
final int id = v.getId();
|
||||||
if (id == R.id.time_open)
|
if (id == R.id.time_open)
|
||||||
pickTime(getBindingAdapterPosition(), HoursMinutesPickerFragment.TAB_FROM, ID_OPENING);
|
pickTime(getBindingAdapterPosition(), ID_OPENING_TIME, false);
|
||||||
else if (id == R.id.time_close)
|
else if (id == R.id.time_close)
|
||||||
pickTime(getBindingAdapterPosition(), HoursMinutesPickerFragment.TAB_TO, ID_OPENING);
|
pickTime(getBindingAdapterPosition(), ID_OPENING_TIME, true);
|
||||||
else if (id == R.id.tv__remove_timetable)
|
else if (id == R.id.tv__remove_timetable)
|
||||||
removeTimetable(getBindingAdapterPosition());
|
removeTimetable(getBindingAdapterPosition());
|
||||||
else if (id == R.id.tv__add_closed)
|
else if (id == R.id.tv__add_closed)
|
||||||
pickTime(getBindingAdapterPosition(), HoursMinutesPickerFragment.TAB_FROM, ID_CLOSING);
|
pickTime(getBindingAdapterPosition(), ID_CLOSED_SPAN, false);
|
||||||
else if (id == R.id.allday)
|
else if (id == R.id.allday)
|
||||||
swAllday.toggle();
|
swAllday.toggle();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,10 +8,9 @@ import androidx.annotation.NonNull;
|
|||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
import app.organicmaps.base.BaseMwmRecyclerFragment;
|
import app.organicmaps.base.BaseMwmRecyclerFragment;
|
||||||
import app.organicmaps.sdk.editor.data.HoursMinutes;
|
|
||||||
|
|
||||||
public class SimpleTimetableFragment extends BaseMwmRecyclerFragment<SimpleTimetableAdapter>
|
public class SimpleTimetableFragment extends BaseMwmRecyclerFragment<SimpleTimetableAdapter>
|
||||||
implements TimetableProvider, HoursMinutesPickerFragment.OnPickListener
|
implements TimetableProvider
|
||||||
{
|
{
|
||||||
private SimpleTimetableAdapter mAdapter;
|
private SimpleTimetableAdapter mAdapter;
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -57,10 +56,4 @@ public class SimpleTimetableFragment extends BaseMwmRecyclerFragment<SimpleTimet
|
|||||||
{
|
{
|
||||||
mInitTimetables = timetables;
|
mInitTimetables = timetables;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onHoursMinutesPicked(HoursMinutes from, HoursMinutes to, int id)
|
|
||||||
{
|
|
||||||
mAdapter.onHoursMinutesPicked(from, to, id);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -273,7 +273,7 @@ public class SearchFragment extends BaseMwmFragment implements SearchListener, C
|
|||||||
RecyclerView mResults = mResultsFrame.findViewById(R.id.recycler);
|
RecyclerView mResults = mResultsFrame.findViewById(R.id.recycler);
|
||||||
setRecyclerScrollListener(mResults);
|
setRecyclerScrollListener(mResults);
|
||||||
mResultsPlaceholder = mResultsFrame.findViewById(R.id.placeholder);
|
mResultsPlaceholder = mResultsFrame.findViewById(R.id.placeholder);
|
||||||
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query);
|
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||||
mSearchAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver()
|
mSearchAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver()
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class SearchHistoryFragment extends BaseMwmRecyclerFragment<SearchHistory
|
|||||||
super.onViewCreated(view, savedInstanceState);
|
super.onViewCreated(view, savedInstanceState);
|
||||||
getRecyclerView().setLayoutManager(new LinearLayoutManager(view.getContext()));
|
getRecyclerView().setLayoutManager(new LinearLayoutManager(view.getContext()));
|
||||||
mPlaceHolder = view.findViewById(R.id.placeholder);
|
mPlaceHolder = view.findViewById(R.id.placeholder);
|
||||||
mPlaceHolder.setContent(R.string.search_history_title, R.string.search_history_text);
|
mPlaceHolder.setContent(R.string.search_history_title, R.string.search_history_text, R.drawable.ic_search_recent);
|
||||||
|
|
||||||
getAdapter().registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
|
getAdapter().registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -90,28 +90,36 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
|||||||
{
|
{
|
||||||
SwitchCompat tollsBtn = root.findViewById(R.id.avoid_tolls_btn);
|
SwitchCompat tollsBtn = root.findViewById(R.id.avoid_tolls_btn);
|
||||||
tollsBtn.setChecked(RoutingOptions.hasOption(RoadType.Toll));
|
tollsBtn.setChecked(RoutingOptions.hasOption(RoadType.Toll));
|
||||||
CompoundButton.OnCheckedChangeListener tollBtnListener = new ToggleRoutingOptionListener(RoadType.Toll);
|
CompoundButton.OnCheckedChangeListener tollBtnListener = new ToggleRoutingOptionListener(RoadType.Toll, root);
|
||||||
tollsBtn.setOnCheckedChangeListener(tollBtnListener);
|
tollsBtn.setOnCheckedChangeListener(tollBtnListener);
|
||||||
|
|
||||||
SwitchCompat motorwaysBtn = root.findViewById(R.id.avoid_motorways_btn);
|
SwitchCompat motorwaysBtn = root.findViewById(R.id.avoid_motorways_btn);
|
||||||
motorwaysBtn.setChecked(RoutingOptions.hasOption(RoadType.Motorway));
|
motorwaysBtn.setChecked(RoutingOptions.hasOption(RoadType.Motorway));
|
||||||
CompoundButton.OnCheckedChangeListener motorwayBtnListener = new ToggleRoutingOptionListener(RoadType.Motorway);
|
CompoundButton.OnCheckedChangeListener motorwayBtnListener =
|
||||||
|
new ToggleRoutingOptionListener(RoadType.Motorway, root);
|
||||||
motorwaysBtn.setOnCheckedChangeListener(motorwayBtnListener);
|
motorwaysBtn.setOnCheckedChangeListener(motorwayBtnListener);
|
||||||
|
|
||||||
SwitchCompat ferriesBtn = root.findViewById(R.id.avoid_ferries_btn);
|
SwitchCompat ferriesBtn = root.findViewById(R.id.avoid_ferries_btn);
|
||||||
ferriesBtn.setChecked(RoutingOptions.hasOption(RoadType.Ferry));
|
ferriesBtn.setChecked(RoutingOptions.hasOption(RoadType.Ferry));
|
||||||
CompoundButton.OnCheckedChangeListener ferryBtnListener = new ToggleRoutingOptionListener(RoadType.Ferry);
|
CompoundButton.OnCheckedChangeListener ferryBtnListener = new ToggleRoutingOptionListener(RoadType.Ferry, root);
|
||||||
ferriesBtn.setOnCheckedChangeListener(ferryBtnListener);
|
ferriesBtn.setOnCheckedChangeListener(ferryBtnListener);
|
||||||
|
|
||||||
SwitchCompat dirtyRoadsBtn = root.findViewById(R.id.avoid_dirty_roads_btn);
|
SwitchCompat dirtyRoadsBtn = root.findViewById(R.id.avoid_dirty_roads_btn);
|
||||||
dirtyRoadsBtn.setChecked(RoutingOptions.hasOption(RoadType.Dirty));
|
dirtyRoadsBtn.setChecked(RoutingOptions.hasOption(RoadType.Dirty));
|
||||||
CompoundButton.OnCheckedChangeListener dirtyBtnListener = new ToggleRoutingOptionListener(RoadType.Dirty);
|
dirtyRoadsBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Paved) || RoutingOptions.hasOption(RoadType.Dirty));
|
||||||
|
CompoundButton.OnCheckedChangeListener dirtyBtnListener = new ToggleRoutingOptionListener(RoadType.Dirty, root);
|
||||||
dirtyRoadsBtn.setOnCheckedChangeListener(dirtyBtnListener);
|
dirtyRoadsBtn.setOnCheckedChangeListener(dirtyBtnListener);
|
||||||
|
|
||||||
SwitchCompat stepsBtn = root.findViewById(R.id.avoid_steps_btn);
|
SwitchCompat stepsBtn = root.findViewById(R.id.avoid_steps_btn);
|
||||||
stepsBtn.setChecked(RoutingOptions.hasOption(RoadType.Steps));
|
stepsBtn.setChecked(RoutingOptions.hasOption(RoadType.Steps));
|
||||||
CompoundButton.OnCheckedChangeListener stepsBtnListener = new ToggleRoutingOptionListener(RoadType.Steps);
|
CompoundButton.OnCheckedChangeListener stepsBtnListener = new ToggleRoutingOptionListener(RoadType.Steps, root);
|
||||||
stepsBtn.setOnCheckedChangeListener(stepsBtnListener);
|
stepsBtn.setOnCheckedChangeListener(stepsBtnListener);
|
||||||
|
|
||||||
|
SwitchCompat pavedBtn = root.findViewById(R.id.avoid_paved_roads_btn);
|
||||||
|
pavedBtn.setChecked(RoutingOptions.hasOption(RoadType.Paved));
|
||||||
|
pavedBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Dirty) || RoutingOptions.hasOption(RoadType.Paved));
|
||||||
|
CompoundButton.OnCheckedChangeListener pavedBtnListener = new ToggleRoutingOptionListener(RoadType.Paved, root);
|
||||||
|
pavedBtn.setOnCheckedChangeListener(pavedBtnListener);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static class ToggleRoutingOptionListener implements CompoundButton.OnCheckedChangeListener
|
private static class ToggleRoutingOptionListener implements CompoundButton.OnCheckedChangeListener
|
||||||
@@ -119,9 +127,13 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
|||||||
@NonNull
|
@NonNull
|
||||||
private final RoadType mRoadType;
|
private final RoadType mRoadType;
|
||||||
|
|
||||||
private ToggleRoutingOptionListener(@NonNull RoadType roadType)
|
@NonNull
|
||||||
|
private final View mRoot;
|
||||||
|
|
||||||
|
private ToggleRoutingOptionListener(@NonNull RoadType roadType, @NonNull View root)
|
||||||
{
|
{
|
||||||
mRoadType = roadType;
|
mRoadType = roadType;
|
||||||
|
mRoot = root;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -131,6 +143,27 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
|||||||
RoutingOptions.addOption(mRoadType);
|
RoutingOptions.addOption(mRoadType);
|
||||||
else
|
else
|
||||||
RoutingOptions.removeOption(mRoadType);
|
RoutingOptions.removeOption(mRoadType);
|
||||||
|
|
||||||
|
SwitchCompat dirtyRoadsBtn = mRoot.findViewById(R.id.avoid_dirty_roads_btn);
|
||||||
|
SwitchCompat pavedBtn = mRoot.findViewById(R.id.avoid_paved_roads_btn);
|
||||||
|
if (mRoadType == RoadType.Dirty)
|
||||||
|
{
|
||||||
|
pavedBtn.setEnabled(!isChecked);
|
||||||
|
if (isChecked)
|
||||||
|
{
|
||||||
|
pavedBtn.setChecked(false);
|
||||||
|
dirtyRoadsBtn.setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (mRoadType == RoadType.Paved)
|
||||||
|
{
|
||||||
|
dirtyRoadsBtn.setEnabled(!isChecked);
|
||||||
|
if (isChecked)
|
||||||
|
{
|
||||||
|
dirtyRoadsBtn.setChecked(false);
|
||||||
|
pavedBtn.setEnabled(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package app.organicmaps.widget;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.Resources;
|
import android.content.res.Resources;
|
||||||
import android.content.res.TypedArray;
|
import android.content.res.TypedArray;
|
||||||
|
import android.graphics.drawable.Drawable;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
@@ -11,6 +12,7 @@ import androidx.annotation.DrawableRes;
|
|||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
import androidx.annotation.Nullable;
|
import androidx.annotation.Nullable;
|
||||||
import androidx.annotation.StringRes;
|
import androidx.annotation.StringRes;
|
||||||
|
import androidx.core.content.ContextCompat;
|
||||||
|
|
||||||
import com.google.android.material.imageview.ShapeableImageView;
|
import com.google.android.material.imageview.ShapeableImageView;
|
||||||
import com.google.android.material.textview.MaterialTextView;
|
import com.google.android.material.textview.MaterialTextView;
|
||||||
@@ -176,9 +178,10 @@ public class PlaceholderView extends LinearLayout
|
|||||||
return view.getMeasuredHeight() + params.bottomMargin + params.topMargin;
|
return view.getMeasuredHeight() + params.bottomMargin + params.topMargin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setContent(@StringRes int titleRes, @StringRes int subtitleRes)
|
public void setContent(@StringRes int titleRes, @StringRes int subtitleRes, @DrawableRes int iconRes)
|
||||||
{
|
{
|
||||||
mTitle.setText(titleRes);
|
mTitle.setText(titleRes);
|
||||||
mSubtitle.setText(subtitleRes);
|
mSubtitle.setText(subtitleRes);
|
||||||
|
mImage.setImageDrawable(ContextCompat.getDrawable(getContext(), iconRes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package app.organicmaps.widget.placepage;
|
package app.organicmaps.widget.placepage;
|
||||||
|
|
||||||
|
import android.app.Dialog;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
@@ -14,6 +15,7 @@ import androidx.annotation.Nullable;
|
|||||||
import androidx.core.view.ViewCompat;
|
import androidx.core.view.ViewCompat;
|
||||||
import androidx.core.view.WindowCompat;
|
import androidx.core.view.WindowCompat;
|
||||||
import androidx.core.view.WindowInsetsCompat;
|
import androidx.core.view.WindowInsetsCompat;
|
||||||
|
import androidx.fragment.app.DialogFragment;
|
||||||
import androidx.fragment.app.FragmentFactory;
|
import androidx.fragment.app.FragmentFactory;
|
||||||
import androidx.fragment.app.FragmentManager;
|
import androidx.fragment.app.FragmentManager;
|
||||||
import app.organicmaps.R;
|
import app.organicmaps.R;
|
||||||
@@ -103,9 +105,9 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
|
|||||||
public EditBookmarkFragment() {}
|
public EditBookmarkFragment() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getCustomTheme()
|
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||||
{
|
super.onCreate(savedInstanceState);
|
||||||
return getFullscreenTheme();
|
setStyle(DialogFragment.STYLE_NORMAL, R.style.MwmTheme_FullScreenDialog);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -181,6 +183,12 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
|
|||||||
public void onStart()
|
public void onStart()
|
||||||
{
|
{
|
||||||
super.onStart();
|
super.onStart();
|
||||||
|
Dialog dialog = getDialog();
|
||||||
|
if (dialog != null) {
|
||||||
|
dialog.getWindow().setLayout(
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
|
ViewGroup.LayoutParams.MATCH_PARENT);
|
||||||
|
}
|
||||||
|
|
||||||
// Focus name and show keyboard for "Unknown Place" bookmarks
|
// Focus name and show keyboard for "Unknown Place" bookmarks
|
||||||
if (mBookmark != null
|
if (mBookmark != null
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ public class PlacePageView extends Fragment
|
|||||||
private View mEditTopSpace;
|
private View mEditTopSpace;
|
||||||
private ShapeableImageView mColorIcon;
|
private ShapeableImageView mColorIcon;
|
||||||
private MaterialTextView mTvCategory;
|
private MaterialTextView mTvCategory;
|
||||||
private ShapeableImageView mEditBookmark;
|
private MaterialButton mEditBookmark;
|
||||||
|
|
||||||
// Data
|
// Data
|
||||||
private CoordinatesFormat mCoordsFormat = CoordinatesFormat.LatLonDecimal;
|
private CoordinatesFormat mCoordsFormat = CoordinatesFormat.LatLonDecimal;
|
||||||
@@ -691,16 +691,27 @@ public class PlacePageView extends Fragment
|
|||||||
mTvAddPlace.setOnClickListener(this);
|
mTvAddPlace.setOnClickListener(this);
|
||||||
mTvEditPlace.setEnabled(Editor.nativeShouldEnableEditPlace());
|
mTvEditPlace.setEnabled(Editor.nativeShouldEnableEditPlace());
|
||||||
mTvAddPlace.setEnabled(Editor.nativeShouldEnableAddPlace());
|
mTvAddPlace.setEnabled(Editor.nativeShouldEnableAddPlace());
|
||||||
final int editPlaceButtonColor =
|
final int editTextButtonColor =
|
||||||
Editor.nativeShouldEnableEditPlace()
|
Editor.nativeShouldEnableEditPlace()
|
||||||
? ContextCompat.getColor(
|
? ContextCompat.getColor(
|
||||||
getContext(),
|
getContext(),
|
||||||
UiUtils.getStyledResourceId(getContext(), com.google.android.material.R.attr.colorSecondary))
|
UiUtils.getStyledResourceId(getContext(), com.google.android.material.R.attr.colorSecondary))
|
||||||
: ContextCompat.getColor(getContext(), R.color.button_accent_text_disabled);
|
: ContextCompat.getColor(getContext(), R.color.button_accent_text_disabled);
|
||||||
mTvEditPlace.setTextColor(editPlaceButtonColor);
|
final ColorStateList editStrokeButtonColor = new ColorStateList(
|
||||||
mTvAddPlace.setTextColor(editPlaceButtonColor);
|
new int[][]{
|
||||||
mTvEditPlace.setStrokeColor(ColorStateList.valueOf(editPlaceButtonColor));
|
new int[]{android.R.attr.state_enabled}, // enabled
|
||||||
mTvAddPlace.setStrokeColor(ColorStateList.valueOf(editPlaceButtonColor));
|
new int[]{-android.R.attr.state_enabled} // disabled
|
||||||
|
},
|
||||||
|
new int[]{
|
||||||
|
ContextCompat.getColor(
|
||||||
|
getContext(),
|
||||||
|
UiUtils.getStyledResourceId(getContext(), com.google.android.material.R.attr.colorSecondary)),
|
||||||
|
ContextCompat.getColor(getContext(), R.color.button_accent_text_disabled)
|
||||||
|
});
|
||||||
|
mTvEditPlace.setTextColor(editTextButtonColor);
|
||||||
|
mTvAddPlace.setTextColor(editTextButtonColor);
|
||||||
|
mTvEditPlace.setStrokeColor(editStrokeButtonColor);
|
||||||
|
mTvAddPlace.setStrokeColor(editStrokeButtonColor);
|
||||||
UiUtils.showIf(
|
UiUtils.showIf(
|
||||||
UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace),
|
UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace),
|
||||||
mEditTopSpace);
|
mEditTopSpace);
|
||||||
|
|||||||
@@ -59,8 +59,6 @@ public class PlacePageBookmarkFragment extends Fragment implements View.OnClickL
|
|||||||
mFrame = view;
|
mFrame = view;
|
||||||
mTvBookmarkNote = mFrame.findViewById(R.id.tv__bookmark_notes);
|
mTvBookmarkNote = mFrame.findViewById(R.id.tv__bookmark_notes);
|
||||||
mTvBookmarkNote.setOnLongClickListener(this);
|
mTvBookmarkNote.setOnLongClickListener(this);
|
||||||
final View editBookmarkBtn = mFrame.findViewById(R.id.tv__bookmark_edit);
|
|
||||||
editBookmarkBtn.setOnClickListener(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initWebView()
|
private void initWebView()
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 520 B |
|
Before Width: | Height: | Size: 620 B |
|
Before Width: | Height: | Size: 594 B |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 88 B |
|
Before Width: | Height: | Size: 42 B |
|
Before Width: | Height: | Size: 44 B |
|
Before Width: | Height: | Size: 338 B |
|
Before Width: | Height: | Size: 414 B |
|
Before Width: | Height: | Size: 402 B |
|
Before Width: | Height: | Size: 64 B |
|
Before Width: | Height: | Size: 70 B |
|
Before Width: | Height: | Size: 44 B |
|
Before Width: | Height: | Size: 42 B |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 86 B |
|
Before Width: | Height: | Size: 72 B |
|
Before Width: | Height: | Size: 68 B |
|
Before Width: | Height: | Size: 94 B |
|
Before Width: | Height: | Size: 92 B |
|
Before Width: | Height: | Size: 130 B |
|
Before Width: | Height: | Size: 112 B |
|
Before Width: | Height: | Size: 134 B |
|
Before Width: | Height: | Size: 110 B |
|
Before Width: | Height: | Size: 690 B |
|
Before Width: | Height: | Size: 826 B |
|
Before Width: | Height: | Size: 814 B |
|
Before Width: | Height: | Size: 94 B |
|
Before Width: | Height: | Size: 100 B |
|
Before Width: | Height: | Size: 46 B |
|
Before Width: | Height: | Size: 50 B |
|
Before Width: | Height: | Size: 1016 B |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 118 B |
|
Before Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 54 B |
|
Before Width: | Height: | Size: 60 B |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 136 B |
|
Before Width: | Height: | Size: 132 B |
|
Before Width: | Height: | Size: 66 B |
|
Before Width: | Height: | Size: 80 B |
@@ -2,5 +2,5 @@
|
|||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="@color/bg_cards"/>
|
<solid android:color="@color/bg_cards"/>
|
||||||
<corners android:radius="4dp"/>
|
<corners android:radius="8dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:shape="rectangle">
|
android:shape="rectangle">
|
||||||
<solid android:color="@color/base_accent"/>
|
<solid android:color="@color/bg_primary"/>
|
||||||
<corners android:radius="4dp"/>
|
<corners android:radius="8dp"/>
|
||||||
</shape>
|
</shape>
|
||||||
10
android/app/src/main/res/drawable/ic_avoid_ferry.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="80"
|
||||||
|
android:viewportHeight="80">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF"
|
||||||
|
android:pathData="m6.778,18.994 l5.418,5.418c-2.663,4.673 -4.184,10.086 -4.184,15.858 0,9.988 4.552,18.9 11.701,24.763 -0.03,-0.193 -0.021,-0.395 0.031,-0.596 0.113,-0.434 0.412,-0.79 0.81,-0.977l0.26,-0.094c0.57,-0.219 1.076,-0.463 1.548,-0.737l0.579,-0.359 1.178,-0.808c1.482,-0.993 2.772,-1.415 4.902,-1.415 2.125,0 3.459,0.506 5.32,1.775l0.757,0.534c1.89,1.354 2.921,1.797 4.871,1.797 1.787,0 2.877,-0.387 4.506,-1.464l0.955,-0.657c1.056,-0.732 1.931,-1.241 2.826,-1.56l2.32,2.32c-1.086,0.053 -1.893,0.372 -3.075,1.144l-0.957,0.656c-2.341,1.629 -3.944,2.298 -6.576,2.298 -2.414,0 -3.892,-0.548 -5.902,-1.915l-0.798,-0.562c-1.725,-1.235 -2.624,-1.628 -4.249,-1.628 -1.392,0 -2.152,0.198 -3.039,0.734l-0.616,0.407 -0.561,0.389c-0.385,0.264 -0.713,0.475 -1.07,0.682 -0.771,0.447 -1.608,0.828 -2.576,1.152 5.265,3.839 11.755,6.103 18.786,6.103 5.782,0 11.203,-1.531 15.881,-4.209l5.409,5.408c-6.143,3.939 -13.451,6.223 -21.29,6.223 -21.729,0 -39.404,-17.627 -39.404,-39.404 0,-7.839 2.291,-15.141 6.236,-21.276zM7.342,2.707 L77.558,72.923c1.368,1.368 1.368,3.59 0,4.958 -1.368,1.368 -3.59,1.368 -4.958,0l-70.216,-70.216c-1.368,-1.368 -1.368,-3.59 0,-4.958 1.368,-1.368 3.59,-1.368 4.958,0zM39.947,0.865c21.777,0 39.453,17.627 39.453,39.404 0,7.852 -2.298,15.164 -6.257,21.305l-5.423,-5.423c2.679,-4.678 4.21,-10.1 4.21,-15.882 0,-17.676 -14.307,-31.982 -31.983,-31.982 -5.785,0 -11.204,1.533 -15.877,4.214l-5.398,-5.399c6.14,-3.948 13.445,-6.238 21.276,-6.238zM27.862,40.076 L46.428,58.64c-0.133,0.082 -0.269,0.168 -0.407,0.257l-1.038,0.71c-1.924,1.339 -3.047,1.808 -5.012,1.808 -1.773,0 -2.786,-0.366 -4.375,-1.45l-0.731,-0.516c-2.147,-1.537 -3.524,-2.14 -5.842,-2.14 -2.13,0 -3.42,0.422 -4.902,1.415l-0.515,0.355 -6.9,-16.406zM51.512,39.944 L63.237,42.673 60.57,49.002zM44.497,19.925 L50.009,19.931c0.611,0 1.146,0.407 1.309,0.996l4.901,17.731 -7.814,-1.821 -6.81,-6.81 9.468,0.004 -1.787,-6.46c-0.054,-0.196 -0.233,-0.332 -0.436,-0.332l-7.738,-0.003 -0,6.297 -2.264,-2.264 0.001,-4.033 -4.032,0.002 -3.309,-3.309zM24.309,36.523 L25.928,38.142 23.719,38.657zM41.782,14.048c0.25,0 0.453,0.203 0.453,0.453l-0.007,4.025h-4.523l0.002,-4.025c0,-0.25 0.203,-0.453 0.453,-0.453z"
|
||||||
|
android:fillType="evenOdd"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="89"
|
||||||
|
android:viewportHeight="101">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="m64.75,87.76c4.1,0 6.97,1.02 10.93,3.37l1.77,1.06c1.04,0.62 1.96,1.14 2.85,1.57l0.11,0.03c1.54,0.46 2.42,2.07 1.97,3.62 -0.24,0.82 -0.83,1.49 -1.6,1.83l-0.48,0.17c-1.35,-0.51 -2.68,-1.16 -4.14,-1.98l-1.81,-1.06 -1.29,-0.78c-3.24,-1.92 -5.28,-2.65 -8.29,-2.65 -2.4,0 -4,0.57 -6.46,2.18l-1.81,1.24c-4.43,3.08 -7.46,4.35 -12.44,4.35 -4.57,0 -7.36,-1.04 -11.17,-3.62l-1.51,-1.06c-3.26,-2.34 -4.96,-3.08 -8.04,-3.08 -2.64,0 -4.07,0.37 -5.75,1.39l-1.17,0.77 -1.06,0.74c-0.73,0.5 -1.35,0.9 -2.02,1.29 -1.63,0.94 -3.41,1.73 -5.52,2.39 -1.51,-0.39 -2.42,-1.94 -2.03,-3.45 0.21,-0.82 0.78,-1.49 1.53,-1.85l0.49,-0.18c1.08,-0.41 2.04,-0.88 2.93,-1.39l1.1,-0.68 2.23,-1.53c2.81,-1.88 5.25,-2.68 9.28,-2.68 4.02,0 6.55,0.96 10.07,3.36l1.43,1.01c3.58,2.56 5.53,3.4 9.22,3.4 3.38,0 5.44,-0.73 8.53,-2.77l1.81,-1.24c3.83,-2.66 6.41,-3.76 10.38,-3.76zM44.03,44.64 L88.06,54.89 75.11,85.62c-3.67,-2.11 -6.46,-3.04 -10.36,-3.04 -3.58,0 -6.02,0.89 -9.27,3.01l-1.96,1.34c-3.64,2.53 -5.77,3.42 -9.49,3.42 -3.35,0 -5.27,-0.69 -8.28,-2.74l-1.38,-0.98c-4.06,-2.91 -6.67,-4.05 -11.06,-4.05 -4.03,0 -6.47,0.8 -9.28,2.68l-0.97,0.67 -13.06,-31.05zM52.59,11.83 L63.02,11.85c1.16,0 2.17,0.77 2.48,1.88l9.28,33.55 -30.75,-7.16 -30.76,7.16 9.28,-33.55c0.31,-1.11 1.32,-1.88 2.48,-1.88zM41.88,18.1 L27.25,18.11c-0.39,0 -0.72,0.26 -0.83,0.63l-3.38,12.22 18.84,-0.01zM46.17,18.1v12.85l18.85,0.01 -3.38,-12.22c-0.1,-0.37 -0.44,-0.63 -0.83,-0.63zM47.46,0.71c0.47,0 0.86,0.38 0.86,0.86l-0.01,7.62h-8.56l0,-7.62c0,-0.47 0.38,-0.86 0.86,-0.86z" />
|
||||||
|
|
||||||
|
</vector>
|
||||||
12
android/app/src/main/res/drawable/ic_avoid_ferry_enabled.xml
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="89"
|
||||||
|
android:viewportHeight="101">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="m65.11,87.89c2.22,0 4.09,0.3 5.95,0.95l2.49,2.49c1.86,1.86 4.38,2.67 6.81,2.42l0.29,0.15 0.11,0.03c1.54,0.46 2.42,2.07 1.97,3.62 -0.24,0.82 -0.83,1.49 -1.6,1.83l-0.48,0.17c-1.35,-0.51 -2.68,-1.16 -4.14,-1.98l-1.81,-1.06 -1.29,-0.78c-3.24,-1.92 -5.28,-2.65 -8.29,-2.65 -2.4,0 -4,0.57 -6.46,2.18l-1.81,1.24c-4.43,3.08 -7.46,4.35 -12.44,4.35 -4.57,0 -7.36,-1.04 -11.17,-3.62l-1.51,-1.06c-3.26,-2.34 -4.96,-3.08 -8.04,-3.08 -2.64,0 -4.07,0.37 -5.75,1.39l-1.17,0.77 -1.06,0.74c-0.73,0.5 -1.35,0.9 -2.02,1.29 -1.63,0.94 -3.41,1.73 -5.52,2.39 -1.51,-0.39 -2.42,-1.94 -2.03,-3.45 0.21,-0.82 0.78,-1.49 1.53,-1.85l0.49,-0.18c1.08,-0.41 2.04,-0.88 2.93,-1.39l1.1,-0.68 2.23,-1.53c2.81,-1.88 5.25,-2.68 9.28,-2.68 4.02,0 6.55,0.96 10.07,3.36l1.43,1.01c3.58,2.56 5.53,3.4 9.22,3.4 3.38,0 5.44,-0.73 8.53,-2.77l1.81,-1.24c3.83,-2.66 6.41,-3.76 10.38,-3.76zM30.27,48.05 L64.93,82.71 64.7,82.71c-3.36,0.07 -5.74,0.97 -8.86,3l-1.96,1.34c-3.64,2.53 -5.77,3.42 -9.49,3.42 -3.35,0 -5.27,-0.69 -8.28,-2.74l-1.38,-0.98c-4.06,-2.91 -6.67,-4.05 -11.06,-4.05 -4.03,0 -6.47,0.8 -9.28,2.68l-0.97,0.67 -13.06,-31.05zM11.76,12.69 L81.98,82.9c1.37,1.37 1.37,3.59 0,4.96 -1.37,1.37 -3.59,1.37 -4.96,0l-70.22,-70.22c-1.37,-1.37 -1.37,-3.59 0,-4.96s3.59,-1.37 4.96,0zM52.7,46.7 L88.42,55.01 80.3,74.29zM52.95,11.96 L63.38,11.97c1.16,0 2.17,0.77 2.48,1.88l9.28,33.55 -28.32,-6.6 -9.73,-9.73 5.16,-0v-12.85l-14.64,0.01c-0.39,0 -0.72,0.26 -0.83,0.63l-0.42,1.5 -4.11,-4.11 0.66,-2.39c0.31,-1.11 1.32,-1.88 2.48,-1.88zM17.1,34.88 L26.61,44.39 13.63,47.41zM46.53,18.23v12.85l18.85,0.01 -3.38,-12.22c-0.1,-0.37 -0.44,-0.63 -0.83,-0.63zM47.82,0.84c0.47,0 0.86,0.38 0.86,0.86l-0.01,7.62h-8.56l0,-7.62c0,-0.47 0.38,-0.86 0.86,-0.86z" />
|
||||||
|
|
||||||
|
</vector>
|
||||||
10
android/app/src/main/res/drawable/ic_avoid_motorways.xml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="80"
|
||||||
|
android:viewportHeight="80">
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF"
|
||||||
|
android:pathData="m6.682,18.589 l5.418,5.418c-2.663,4.673 -4.184,10.086 -4.184,15.858 0,17.676 14.258,31.982 31.934,31.982 5.782,0 11.204,-1.531 15.882,-4.21l5.408,5.408c-6.143,3.939 -13.451,6.223 -21.29,6.223 -21.729,0 -39.404,-17.627 -39.404,-39.404 0,-7.839 2.291,-15.141 6.236,-21.276zM7.246,2.303 L77.461,72.519c1.368,1.368 1.368,3.59 0,4.958 -1.368,1.368 -3.59,1.368 -4.958,0l-70.216,-70.216c-1.368,-1.368 -1.368,-3.59 0,-4.958 1.368,-1.368 3.59,-1.368 4.958,0zM42.002,53.908 L50.794,62.7 42.266,62.701zM26.358,38.264 L37.87,49.776 37.482,62.701h-16.745zM39.85,0.461c21.777,0 39.453,17.627 39.453,39.404 0,7.852 -2.298,15.164 -6.257,21.305l-5.423,-5.424c2.679,-4.678 4.21,-10.1 4.21,-15.882 0,-17.676 -14.307,-31.982 -31.983,-31.982 -5.785,0 -11.204,1.533 -15.877,4.214l-5.398,-5.399c6.14,-3.948 13.445,-6.238 21.276,-6.238zM52.291,33.485 L54.361,42.485 45.36,33.484zM61.882,27.266v3.827h-2.871v2.871h-3.827v-2.871l-12.216,-0 -3.827,-3.827zM20.737,32.643 L22.057,33.963 20.737,33.963zM17.866,29.772 L19.186,31.092 17.867,31.093zM48.007,14.859 L50.531,25.83h-9.37l-0.329,-10.971zM38.917,14.859 L38.588,25.83 37.705,25.829 30.805,18.929 31.741,14.859z"
|
||||||
|
android:fillType="evenOdd"/>
|
||||||
|
</vector>
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="84"
|
||||||
|
android:viewportHeight="91">
|
||||||
|
|
||||||
|
<path
|
||||||
|
android:fillColor="#FFF"
|
||||||
|
android:fillType="evenOdd"
|
||||||
|
android:pathData="m65.501,35.443 l12.641,54.961h-31.5l-1.649,-54.961zM39.291,35.443 L37.643,90.404h-31.5l12.641,-54.961zM83.543,23.743v7.2h-5.4v5.4h-7.2v-5.4h-57.6v5.4h-7.2v-5.4h-5.4v-7.2zM40.343,0.404 L39.723,21.043h-17.627l4.747,-20.639zM57.443,0.404 L62.189,21.043h-17.627l-0.619,-20.639z" />
|
||||||
|
|
||||||
|
</vector>
|
||||||