mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-23 06:33:42 +00:00
Compare commits
129 Commits
yannikblos
...
x7z4w-map
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2f9ce76c28 | ||
|
|
ffe07d3337 | ||
|
|
546383d755 | ||
|
|
bf30165b5f | ||
|
|
0288b97b13 | ||
|
|
7e561d09d3 | ||
|
|
298518ae72 | ||
|
|
3bad6d25f0 | ||
|
|
d36361d669 | ||
|
|
688e20b1a6 | ||
|
|
85462161b2 | ||
|
|
b929823f6b | ||
|
|
22dd799585 | ||
|
|
6864d101e2 | ||
|
|
4bfb62b373 | ||
|
|
f1cf844986 | ||
|
|
f20c3bf50c | ||
|
|
e7cc602904 | ||
|
|
d473361e54 | ||
|
|
76d58e4a05 | ||
|
|
7b5878b010 | ||
|
|
3fabbae3f7 | ||
|
|
0add23fcf2 | ||
|
|
08bcb574fa | ||
|
|
db888f33c5 | ||
|
|
4a96d219f0 | ||
|
|
c2bc6c27aa | ||
|
|
1095e5dbc3 | ||
|
|
a1cbcc5885 | ||
|
|
641f2308c6 | ||
|
|
f858ebcce0 | ||
|
|
eb376f5afc | ||
|
|
71b47719af | ||
|
|
4f7230fcbe | ||
|
|
2dafdd4338 | ||
|
|
0237751afe | ||
|
|
e7fb3a2f2c | ||
|
|
e08d60bb40 | ||
|
|
de4252f86c | ||
|
|
9d87d77055 | ||
|
|
c88f59eb75 | ||
|
|
9b5c700ad8 | ||
|
|
7d5e6fabcd | ||
|
|
ebe0364030 | ||
|
|
43e7e1eb2e | ||
|
|
ce9af79a68 | ||
|
|
b54b77bce6 | ||
|
|
038dca9c6f | ||
|
|
47db332f09 | ||
|
|
fdb665317f | ||
|
|
2ac80f7a90 | ||
|
|
c759b4f4a7 | ||
|
|
38802011f8 | ||
|
|
ea887c3209 | ||
|
|
7f075d9bef | ||
|
|
5e576177ea | ||
|
|
2efc001001 | ||
|
|
afa968c7d3 | ||
|
|
22d7cf3969 | ||
|
|
acdcfe62a4 | ||
|
|
67d8249e5a | ||
|
|
a5174623c2 | ||
|
|
c6ac2919fa | ||
|
|
7174d697d4 | ||
|
|
07fb3c0055 | ||
|
|
3b0b4520a1 | ||
|
|
eaa56e5127 | ||
|
|
3f7dc91b5b | ||
|
|
48e1c1f3a5 | ||
|
|
e862da648e | ||
|
|
6d0111b434 | ||
|
|
610737d295 | ||
|
|
26cb42651c | ||
|
|
a702989b09 | ||
|
|
bf6f57d336 | ||
|
|
6b76e9826b | ||
|
|
e19e63930d | ||
|
|
92c2945897 | ||
|
|
2f343d3fba | ||
|
|
955d3702ac | ||
|
|
1d087ca854 | ||
|
|
2c37e22f5c | ||
|
|
2954b3b871 | ||
|
|
c22bc75fb0 | ||
|
|
45094b0c38 | ||
|
|
f4a775a2f9 | ||
|
|
25d84b4428 | ||
|
|
f98a0efa46 | ||
|
|
e53532ab0b | ||
|
|
df1d4bf67e | ||
|
|
6d89a4346d | ||
|
|
971c19a88d | ||
|
|
ff5ae33f2a | ||
|
|
d5f640c6d0 | ||
|
|
72920bb930 | ||
|
|
3b4ab0da89 | ||
|
|
90ee9e3c0f | ||
|
|
54c1aeba1e | ||
|
|
399908b97c | ||
|
|
1df7848888 | ||
|
|
84f7687b98 | ||
|
|
a6057af12d | ||
|
|
4b66d56978 | ||
|
|
6adf01f8de | ||
|
|
2c526d34e9 | ||
|
|
e58fe72250 | ||
|
|
698afc4880 | ||
|
|
20a688505a | ||
|
|
b8e77a0404 | ||
|
|
07cd1ec4f5 | ||
|
|
9b42b08673 | ||
|
|
47efaa77d3 | ||
|
|
ec14b3bb85 | ||
|
|
1612e6045f | ||
|
|
d20144d4f6 | ||
|
|
06ecf4e54a | ||
|
|
0bf9dad343 | ||
|
|
12bd86d26d | ||
|
|
5564c449b3 | ||
|
|
96782ad5b1 | ||
|
|
67938cdf31 | ||
|
|
0e5fa5c501 | ||
|
|
101faeb2aa | ||
|
|
6f9ea8a758 | ||
|
|
176b11003f | ||
|
|
ed0728a332 | ||
|
|
f3b105ee33 | ||
|
|
dd106df592 | ||
|
|
c25552ce03 |
@@ -2,38 +2,73 @@ name: map-generator
|
||||
on:
|
||||
workflow_dispatch: # Manual trigger
|
||||
inputs:
|
||||
jobs:
|
||||
description: 'Which job(s) to run right now?'
|
||||
required: true
|
||||
default: 'all-except-upload'
|
||||
type: choice
|
||||
options:
|
||||
- all-except-upload
|
||||
- copy-coasts
|
||||
- planet
|
||||
- wiki
|
||||
- isolines
|
||||
- subways
|
||||
- tiger
|
||||
- maps
|
||||
- upload
|
||||
map-generator-test:
|
||||
description: 'Test (non-prod) generation?'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
# run-copy-coasts:
|
||||
# description: 'Copy last used coastlines?'
|
||||
# required: false
|
||||
# default: true
|
||||
# type: boolean
|
||||
run-isolines:
|
||||
description: 'Update altitude isolines?'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
run-tiger:
|
||||
description: 'Update TIGER address data?'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
run-planet-pbf:
|
||||
description: 'Update PBF planet (for Wiki & subways)?'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
run-subways:
|
||||
description: 'Update subways?'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
run-wiki:
|
||||
description: 'Update Wikipedia descriptions?'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
run-planet-o5m:
|
||||
description: 'Update O5M planet (for mapgen)?'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
run-mapgen:
|
||||
description: 'Run maps generation?'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
map-generator-continue:
|
||||
description: 'Continue previous map generation?'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
map-generator-countries:
|
||||
description: 'Generate specific MWMs? (i.e. "US_New York_*, foo")'
|
||||
# map-generator-countries:
|
||||
# description: 'Generate specific MWMs? (i.e. "US_New York_*, foo")'
|
||||
# required: false
|
||||
# type: string
|
||||
run-upload:
|
||||
description: 'Upload latest maps to CDN?'
|
||||
required: false
|
||||
type: string
|
||||
reset:
|
||||
description: 'Reset part of the system?'
|
||||
required: false
|
||||
default: 'no'
|
||||
type: choice
|
||||
options:
|
||||
- 'no'
|
||||
- wiki-ratelimit
|
||||
default: false
|
||||
type: boolean
|
||||
# reset:
|
||||
# description: 'Reset part of the system?'
|
||||
# required: false
|
||||
# default: 'no'
|
||||
# type: choice
|
||||
# options:
|
||||
# - 'no'
|
||||
# - wiki-ratelimit
|
||||
|
||||
## RCLONE_CONF is multi-line text containing keys and credentials for us2,ru1,fi1,de1 servers
|
||||
|
||||
@@ -43,10 +78,11 @@ env:
|
||||
WIKIMEDIA_PASSWORD: ${{ secrets.WIKIMEDIA_PASSWORD }}
|
||||
ZULIP_BOT_EMAIL: ${{ secrets.ZULIP_BOT_EMAIL }}
|
||||
ZULIP_API_KEY: ${{ secrets.ZULIP_API_KEY }}
|
||||
MWMTEST: ${{ inputs.map-generator-test }}
|
||||
MWMCONTINUE: ${{ inputs.map-generator-continue }}
|
||||
MWMCOUNTRIES: ${{ inputs.map-generator-countries }}
|
||||
# MWMCOUNTRIES: ${{ inputs.map-generator-countries }}
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
TZ: Etc/UTC
|
||||
TZ: Etc/UTC
|
||||
|
||||
jobs:
|
||||
clone-repos:
|
||||
@@ -69,24 +105,22 @@ jobs:
|
||||
run: |
|
||||
echo "Cloning $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY branch $FORGEJO_REF_NAME"
|
||||
cd ~
|
||||
git clone --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
|
||||
git clone --depth 1 --recurse-submodules --shallow-submodules -b $FORGEJO_REF_NAME --single-branch $FORGEJO_SERVER_URL/$FORGEJO_REPOSITORY.git comaps
|
||||
- name: Checkout wikiparser repo
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~
|
||||
git clone https://codeberg.org/comaps/wikiparser.git
|
||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/wikiparser.git
|
||||
- name: Checkout subways repo
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~
|
||||
git clone https://codeberg.org/comaps/subways.git
|
||||
git clone --depth 1 --single-branch https://codeberg.org/comaps/subways.git
|
||||
|
||||
copy-coasts:
|
||||
if: inputs.jobs == 'copy-coasts' || inputs.jobs == 'all-except-upload'
|
||||
# if: inputs.run-copy-coasts
|
||||
name: Copy Previously Generated Coasts
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
@@ -106,7 +140,7 @@ jobs:
|
||||
|
||||
echo "Before:"
|
||||
ls -al /home/planet/latest_coasts*
|
||||
|
||||
# TODO: don't copy coasts from test generations
|
||||
cp -p /mnt/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.geom /home/planet/latest_coasts.geom
|
||||
cp -p /mnt/4tbexternal/osm-maps/*/intermediate_data/WorldCoasts.rawgeom /home/planet/latest_coasts.rawgeom
|
||||
|
||||
@@ -119,12 +153,103 @@ jobs:
|
||||
|
||||
fi
|
||||
|
||||
update-planet:
|
||||
if: inputs.jobs == 'planet' || inputs.jobs == 'all-except-upload'
|
||||
name: Update Planet
|
||||
update-isolines:
|
||||
if: inputs.run-isolines
|
||||
name: Update Isolines
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
# TODO: we only need to update these if our SRTM or countries change
|
||||
# TODO: after update, verify that sizable files exist: /home/planet/isolines/*.isolines
|
||||
- name: Update Isolines
|
||||
shell: bash
|
||||
# TODO: preserve previous isolines version?
|
||||
# TODO: cleanup the tmp-tiles dir after completion
|
||||
run: |
|
||||
cd ~/comaps/
|
||||
./tools/unix/build_omim.sh -p ~ -R topography_generator_tool
|
||||
rm -rf /home/planet/isolines/
|
||||
mkdir /home/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=/home/planet/isolines/tmp-tiles/ \
|
||||
--countries_isolines_out_dir=/home/planet/isolines/ \
|
||||
--data_dir=./data/ \
|
||||
--srtm_path=/home/planet/SRTM-patched-europe/ \
|
||||
--threads=96
|
||||
- name: Check isolines
|
||||
shell: bash
|
||||
run: |
|
||||
NUMISO=$(ls -al /home/planet/isolines/*.isolines | wc -l)
|
||||
echo "Found $NUMISO isolines"
|
||||
if [ $NUMISO -lt 10 ]; then
|
||||
echo "ERROR: Did generation fail?"
|
||||
exit 1
|
||||
fi
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
||||
--data-urlencode type=stream \
|
||||
--data-urlencode 'to="DevOps"' \
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Isolines are done!'
|
||||
|
||||
update-tiger:
|
||||
if: inputs.run-tiger
|
||||
name: Update TIGER
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
- name: Build address_parser
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~/comaps
|
||||
#rm -rf ~/omim-build-relwithdebinfo/CMakeCache.txt
|
||||
#rm -rf ~/omim-build-relwithdebinfo/CMakeFiles
|
||||
./tools/unix/build_omim.sh -p ~ -R address_parser_tool
|
||||
- name: Update TIGER from Nominatim
|
||||
shell: bash
|
||||
# TODO: use curl instead of wget2
|
||||
run: |
|
||||
# TODO: maybe remove old osm-planet/tiger first?
|
||||
cd /home/planet/
|
||||
mkdir -p tiger
|
||||
wget2 https://nominatim.org/data/tiger-nominatim-preprocessed-latest.csv.tar.gz
|
||||
cd ~/comaps
|
||||
tar -xOzf /home/planet/tiger-nominatim-preprocessed-latest.csv.tar.gz | ~/omim-build-relwithdebinfo/address_parser_tool --output_path=/home/planet/tiger
|
||||
|
||||
update-planet-pbf:
|
||||
if: inputs.run-planet-pbf
|
||||
name: Update PBF Planet
|
||||
runs-on: mapfilemaker
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
@@ -147,20 +272,13 @@ jobs:
|
||||
else
|
||||
echo "planet-latest.osm.pbf was found, raw download not required."
|
||||
fi
|
||||
- name: Update Planet
|
||||
- name: Update PBF Planet
|
||||
shell: bash
|
||||
run: |
|
||||
cd /home/planet/planet/
|
||||
rm -f planet-latest-new.osm.pbf
|
||||
pyosmium-up-to-date planet-latest.osm.pbf -o planet-latest-new.osm.pbf -v --size 16384
|
||||
mv planet-latest-new.osm.pbf planet-latest.osm.pbf
|
||||
- name: Converting planet-latest.osm.pbf to planet.o5m
|
||||
# TODO: better to run osmupdate (not convert) just before starting the maps jobs - for max fresh data.
|
||||
run: |
|
||||
echo "Starting..."
|
||||
cd /home/planet/planet/
|
||||
osmconvert -v --drop-author --drop-version --hash-memory=4000 planet-latest.osm.pbf -o=planet.o5m
|
||||
echo "Done."
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
@@ -168,10 +286,44 @@ jobs:
|
||||
--data-urlencode type=stream \
|
||||
--data-urlencode 'to="DevOps"' \
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Planet update is done!'
|
||||
--data-urlencode 'content=PBF planet update is done!'
|
||||
|
||||
update-subways:
|
||||
if: inputs.run-subways
|
||||
name: Update Subways
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
- name: Update Subways
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~/comaps/
|
||||
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
|
||||
./tools/unix/maps/generate_subways.sh
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
||||
--data-urlencode type=stream \
|
||||
--data-urlencode 'to="DevOps"' \
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Subways are done!'
|
||||
|
||||
wiki-update:
|
||||
if: inputs.jobs == 'wiki' || inputs.jobs == 'all-except-upload'
|
||||
if: inputs.run-wiki
|
||||
name: Update Wikipedia
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
@@ -278,12 +430,10 @@ jobs:
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Wiki update is done!'
|
||||
|
||||
update-isolines:
|
||||
if: inputs.jobs == 'isolines' || inputs.jobs == 'all-except-upload'
|
||||
name: Update Isolines
|
||||
update-planet-o5m:
|
||||
if: inputs.run-planet-o5m
|
||||
name: Update O5M Planet
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
@@ -293,38 +443,32 @@ jobs:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
# TODO: we only need to update these if our SRTM or countries change
|
||||
# TODO: after update, verify that sizable files exist: /home/planet/isolines/*.isolines
|
||||
- name: Update Isolines
|
||||
shell: bash
|
||||
# TODO: preserve previous isolines version?
|
||||
# TODO: cleanup the tmp-tiles dir after completion
|
||||
run: |
|
||||
cd ~/comaps/
|
||||
./tools/unix/build_omim.sh -p ~ -R topography_generator_tool
|
||||
rm -rf /home/planet/isolines/
|
||||
mkdir /home/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=/home/planet/isolines/tmp-tiles/ \
|
||||
--countries_isolines_out_dir=/home/planet/isolines/ \
|
||||
--data_dir=./data/ \
|
||||
--srtm_path=/home/planet/SRTM-patched-europe/ \
|
||||
--threads=96
|
||||
- name: Check isolines
|
||||
- name: Check for O5M Planet File
|
||||
shell: bash
|
||||
run: |
|
||||
NUMISO=$(ls -al /home/planet/isolines/*.isolines | wc -l)
|
||||
echo "Found $NUMISO isolines"
|
||||
if [ $NUMISO -lt 10 ]; then
|
||||
echo "ERROR: Did generation fail?"
|
||||
if [ ! -f /home/planet/planet/planet.o5m ]; then
|
||||
echo "WARN: No file at /home/planet/planet/planet.o5m"
|
||||
|
||||
if [ ! -f /home/planet/planet/planet-latest.osm.pbf ]; then
|
||||
echo "ERROR: No file at /home/planet/planet/planet-latest.osm.pbf"
|
||||
ls -al /home/planet/
|
||||
ls -al /home/planet/planet/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Converting planet-latest.osm.pbf to planet.o5m"
|
||||
cd /home/planet/planet/
|
||||
osmconvert -v --drop-author --drop-version --hash-memory=4000 planet-latest.osm.pbf -o=planet.o5m
|
||||
echo "Conversion is done."
|
||||
fi
|
||||
- name: Update O5M planet
|
||||
run: |
|
||||
echo "Starting..."
|
||||
cd /home/planet/planet/
|
||||
rm -f planet-new.o5m
|
||||
osmupdate -v --drop-author --drop-version --hash-memory=4000 --max-merge=32 --out-o5m planet.o5m planet-new.o5m
|
||||
mv planet-new.o5m planet.o5m
|
||||
echo "Done."
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
@@ -332,81 +476,10 @@ jobs:
|
||||
--data-urlencode type=stream \
|
||||
--data-urlencode 'to="DevOps"' \
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Isolines are done!'
|
||||
|
||||
update-subways:
|
||||
if: inputs.jobs == 'subways' || inputs.jobs == 'all-except-upload'
|
||||
name: Update Subways
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
- name: Update Subways
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~/comaps/
|
||||
cp tools/unix/maps/settings.sh.prod tools/unix/maps/settings.sh
|
||||
./tools/unix/maps/generate_subways.sh
|
||||
- name: Notify Zulip
|
||||
run: |
|
||||
curl -X POST https://comaps.zulipchat.com/api/v1/messages \
|
||||
-u $ZULIP_BOT_EMAIL:$ZULIP_API_KEY \
|
||||
--data-urlencode type=stream \
|
||||
--data-urlencode 'to="DevOps"' \
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Subways are done!'
|
||||
|
||||
update-tiger:
|
||||
if: inputs.jobs == 'tiger' || inputs.jobs == 'all-except-upload'
|
||||
name: Update TIGER
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
- clone-repos
|
||||
container:
|
||||
image: codeberg.org/comaps/maps_generator:f6d53d54f794
|
||||
volumes:
|
||||
- /mnt/4tbexternal/:/mnt/4tbexternal/
|
||||
- /mnt/4tbexternal/osm-planet:/home/planet
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
- name: Build address_parser
|
||||
shell: bash
|
||||
run: |
|
||||
cd ~/comaps
|
||||
#rm -rf ~/omim-build-relwithdebinfo/CMakeCache.txt
|
||||
#rm -rf ~/omim-build-relwithdebinfo/CMakeFiles
|
||||
./tools/unix/build_omim.sh -p ~ -R address_parser_tool
|
||||
- name: Update TIGER from Nominatim
|
||||
shell: bash
|
||||
# TODO: use curl instead of wget2
|
||||
run: |
|
||||
# TODO: maybe remove old osm-planet/tiger first?
|
||||
cd /home/planet/
|
||||
mkdir -p tiger
|
||||
wget2 https://nominatim.org/data/tiger-nominatim-preprocessed-latest.csv.tar.gz
|
||||
cd ~/comaps
|
||||
tar -xOzf /home/planet/tiger-nominatim-preprocessed-latest.csv.tar.gz | ~/omim-build-relwithdebinfo/address_parser_tool --output_path=/home/planet/tiger
|
||||
--data-urlencode 'content=O5M planet update is done!'
|
||||
|
||||
generate-maps:
|
||||
if: inputs.jobs == 'maps' || inputs.jobs == 'all-except-upload'
|
||||
if: inputs.run-mapgen
|
||||
name: Generate Maps
|
||||
runs-on: mapfilemaker
|
||||
needs:
|
||||
@@ -455,7 +528,7 @@ jobs:
|
||||
--data-urlencode 'content=Generator is done!'
|
||||
|
||||
upload-maps:
|
||||
if: inputs.jobs == 'upload'
|
||||
if: inputs.run-upload
|
||||
name: Upload Maps
|
||||
runs-on: mapfilemaker
|
||||
container:
|
||||
@@ -467,6 +540,10 @@ jobs:
|
||||
group: ${{ github.workflow }}-map-generator-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
steps:
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: "~"
|
||||
key: cache-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
- name: Write config file
|
||||
run: |
|
||||
mkdir -p ~/.config/rclone/
|
||||
@@ -498,4 +575,3 @@ jobs:
|
||||
--data-urlencode topic=codeberg-bot \
|
||||
--data-urlencode 'content=Upload is done!'
|
||||
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
480fa6c2fcf53be296504ac6ba8e6b3d70f92b42
|
||||
a6ede2b1466f0c9d8a443600ef337ba6b5832e58
|
||||
1377b81bf1cac72bb6da192da7fed6696d5d5281
|
||||
0288b97b1367bb971eded1018f560598ea274e6c
|
||||
bf30165b5f5de0907c3c64524a3bf8121624b0b7
|
||||
|
||||
13
.github/workflows/ios-check.yaml
vendored
13
.github/workflows/ios-check.yaml
vendored
@@ -8,14 +8,14 @@ on:
|
||||
jobs:
|
||||
ios-check:
|
||||
name: Build iOS
|
||||
runs-on: macos-15
|
||||
runs-on: macos-26
|
||||
env:
|
||||
DEVELOPER_DIR: /Applications/Xcode_26.app/Contents/Developer
|
||||
DEVELOPER_DIR: /Applications/Xcode_26.1.app/Contents/Developer
|
||||
LANG: en_US.UTF-8 # Fastlane complains that the terminal is using ASCII.
|
||||
LANGUAGE: en_US.UTF-8
|
||||
LC_ALL: en_US.UTF-8
|
||||
TEST_RESULTS_BUNDLE_NAME: CoMaps-Test-Results
|
||||
SIMULATOR_DEVICE: 'iPhone 16 Pro Max'
|
||||
SIMULATOR_DEVICE: 'iPhone 17 Pro Max'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -31,6 +31,9 @@ jobs:
|
||||
brew install qt \
|
||||
optipng
|
||||
pip3 install "protobuf<3.21" --break-system-packages
|
||||
xcodebuild -downloadComponent metalToolchain
|
||||
xcodebuild -downloadPlatform iOS
|
||||
|
||||
- name: Checkout sources
|
||||
uses: actions/checkout@v4
|
||||
|
||||
@@ -38,11 +41,11 @@ jobs:
|
||||
shell: bash
|
||||
run: git submodule update --depth 1 --init --recursive --jobs=$(($(sysctl -n hw.logicalcpu) * 20))
|
||||
|
||||
- name: Configure repository
|
||||
- name: Configure repository
|
||||
shell: bash
|
||||
run: ./configure.sh
|
||||
|
||||
- name: Configure XCode cache
|
||||
- name: Configure Xcode cache
|
||||
uses: irgaly/xcode-cache@v1
|
||||
with:
|
||||
key: xcode-cache-deriveddata-${{ github.workflow }}-${{ matrix.buildType }}-${{ github.sha }}
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -188,10 +188,6 @@ tools/python/maps_generator/var/etc/map_generator.ini
|
||||
tools/python/routing/etc/*.ini
|
||||
tools/unix/maps/settings.sh
|
||||
|
||||
# Helpers
|
||||
/node_modules/
|
||||
/package-lock.json
|
||||
|
||||
# Visual Studio
|
||||
.vs
|
||||
|
||||
|
||||
83
3party/ankerl/stl.h
Normal file
83
3party/ankerl/stl.h
Normal file
@@ -0,0 +1,83 @@
|
||||
///////////////////////// ankerl::unordered_dense::{map, set} /////////////////////////
|
||||
|
||||
// A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion.
|
||||
// Version 4.8.1
|
||||
// https://github.com/martinus/unordered_dense
|
||||
//
|
||||
// Licensed under the MIT License <http://opensource.org/licenses/MIT>.
|
||||
// SPDX-License-Identifier: MIT
|
||||
// Copyright (c) 2022 Martin Leitner-Ankerl <martin.ankerl@gmail.com>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all
|
||||
// copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
// SOFTWARE.
|
||||
|
||||
#ifndef ANKERL_STL_H
|
||||
#define ANKERL_STL_H
|
||||
|
||||
#include <array> // for array
|
||||
#include <cstdint> // for uint64_t, uint32_t, std::uint8_t, UINT64_C
|
||||
#include <cstring> // for size_t, memcpy, memset
|
||||
#include <functional> // for equal_to, hash
|
||||
#include <initializer_list> // for initializer_list
|
||||
#include <iterator> // for pair, distance
|
||||
#include <limits> // for numeric_limits
|
||||
#include <memory> // for allocator, allocator_traits, shared_ptr
|
||||
#include <optional> // for optional
|
||||
#include <stdexcept> // for out_of_range
|
||||
#include <string> // for basic_string
|
||||
#include <string_view> // for basic_string_view, hash
|
||||
#include <tuple> // for forward_as_tuple
|
||||
#include <type_traits> // for enable_if_t, declval, conditional_t, ena...
|
||||
#include <utility> // for forward, exchange, pair, as_const, piece...
|
||||
#include <vector> // for vector
|
||||
|
||||
// <memory_resource> includes <mutex>, which fails to compile if
|
||||
// targeting GCC >= 13 with the (rewritten) win32 thread model, and
|
||||
// targeting Windows earlier than Vista (0x600). GCC predefines
|
||||
// _REENTRANT when using the 'posix' model, and doesn't when using the
|
||||
// 'win32' model.
|
||||
#if defined __MINGW64__ && defined __GNUC__ && __GNUC__ >= 13 && !defined _REENTRANT
|
||||
// _WIN32_WINNT is guaranteed to be defined here because of the
|
||||
// <cstdint> inclusion above.
|
||||
# ifndef _WIN32_WINNT
|
||||
# error "_WIN32_WINNT not defined"
|
||||
# endif
|
||||
# if _WIN32_WINNT < 0x600
|
||||
# define ANKERL_MEMORY_RESOURCE_IS_BAD() 1 // NOLINT(cppcoreguidelines-macro-usage)
|
||||
# endif
|
||||
#endif
|
||||
#ifndef ANKERL_MEMORY_RESOURCE_IS_BAD
|
||||
# define ANKERL_MEMORY_RESOURCE_IS_BAD() 0 // NOLINT(cppcoreguidelines-macro-usage)
|
||||
#endif
|
||||
|
||||
#if defined(__has_include) && !defined(ANKERL_UNORDERED_DENSE_DISABLE_PMR)
|
||||
# if __has_include(<memory_resource>) && !ANKERL_MEMORY_RESOURCE_IS_BAD()
|
||||
# define ANKERL_UNORDERED_DENSE_PMR std::pmr // NOLINT(cppcoreguidelines-macro-usage)
|
||||
# include <memory_resource> // for polymorphic_allocator
|
||||
# elif __has_include(<experimental/memory_resource>)
|
||||
# define ANKERL_UNORDERED_DENSE_PMR std::experimental::pmr // NOLINT(cppcoreguidelines-macro-usage)
|
||||
# include <experimental/memory_resource> // for polymorphic_allocator
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && defined(_M_X64)
|
||||
# include <intrin.h>
|
||||
# pragma intrinsic(_umul128)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
2239
3party/ankerl/unordered_dense.h
Normal file
2239
3party/ankerl/unordered_dense.h
Normal file
File diff suppressed because it is too large
Load Diff
@@ -114,19 +114,6 @@ if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo")
|
||||
add_compile_options(-fno-omit-frame-pointer)
|
||||
endif()
|
||||
|
||||
# Linux GCC LTO plugin fix.
|
||||
if (PLATFORM_LINUX AND (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") AND (CMAKE_BUILD_TYPE MATCHES "^Rel"))
|
||||
# To force errors if LTO was not enabled.
|
||||
add_compile_options(-fno-fat-lto-objects)
|
||||
# To fix ar and ranlib "plugin needed to handle lto object".
|
||||
string(REGEX MATCH "[0-9]+" GCC_MAJOR_VERSION ${CMAKE_CXX_COMPILER_VERSION})
|
||||
file(GLOB_RECURSE plugin /usr/lib/gcc/*/${GCC_MAJOR_VERSION}*/liblto_plugin.so)
|
||||
set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
|
||||
set(CMAKE_C_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
|
||||
set(CMAKE_CXX_ARCHIVE_CREATE "<CMAKE_AR> --plugin ${plugin} qcs <TARGET> <OBJECTS>")
|
||||
set(CMAKE_CXX_ARCHIVE_FINISH "<CMAKE_RANLIB> --plugin ${plugin} <TARGET>")
|
||||
endif()
|
||||
|
||||
message(STATUS "Build type: " ${CMAKE_BUILD_TYPE})
|
||||
|
||||
if (PLATFORM_LINUX OR PLATFORM_ANDROID)
|
||||
@@ -222,10 +209,8 @@ if (PLATFORM_DESKTOP AND NOT WITH_SYSTEM_PROVIDED_3PARTY)
|
||||
include_directories("${PROJECT_BINARY_DIR}/3party/gflags/include")
|
||||
endif()
|
||||
|
||||
# Android fails to find boost in many cases, this fixes it.
|
||||
if (PLATFORM_ANDROID)
|
||||
include_directories("${OMIM_ROOT}/3party/boost")
|
||||
endif()
|
||||
# Fix for #include <boost/regex.hpp>
|
||||
include_directories("${OMIM_ROOT}/3party/boost")
|
||||
|
||||
# Used in qt/ and shaders/
|
||||
find_package(Python3 REQUIRED COMPONENTS Interpreter)
|
||||
|
||||
@@ -1,15 +1,16 @@
|
||||
This file contains a list of people who have contributed to this project.
|
||||
Its not neccesarily comprehensive.
|
||||
It is not necessarily comprehensive as contributors must manually add themselves.
|
||||
Feel free to add yourself here along with your first contribution!
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
CoMaps contributors:
|
||||
(in alphabetic order)
|
||||
(in alphabetical order)
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
Bastian Greshake Tzovaras
|
||||
clover sage
|
||||
Harry Bond <me@hbond.xyz>
|
||||
thesupertechie
|
||||
vikiawv
|
||||
Yannik Bloscheck
|
||||
|
||||
|
||||
@@ -377,6 +377,7 @@ play {
|
||||
track.set('production')
|
||||
defaultToAppBundles.set(true)
|
||||
releaseStatus.set(ReleaseStatus.IN_PROGRESS)
|
||||
userFraction.set(0.2d) // Rollout to 20% of users
|
||||
serviceAccountCredentials.set(file('google-play.json'))
|
||||
}
|
||||
|
||||
|
||||
32
android/app/src/fdroid/play/listings/ca/full-description.txt
Normal file
32
android/app/src/fdroid/play/listings/ca/full-description.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
Una aplicació de mapes gratuïta i de codi obert dirigida per la comunitat basada en dades d'OpenStreetMap i reforçada amb el compromís amb la transparència, la privadesa i la no ànim de lucre. CoMaps és una derivació/fork d'Organic Maps, que al seu torn és una derivació de Maps.ME.
|
||||
|
||||
Llegiu sobre els motius del projecte i la seva direcció a <b><i>codeberg.org/comaps</i></b>.
|
||||
Uneix-te a la comunitat i ajuda a crear la millor aplicació de mapes
|
||||
• Utilitza l'aplicació i difon-la
|
||||
• Dona comentaris i informa de problemes
|
||||
• Actualitza les dades del mapa a l'aplicació o al lloc web d'OpenStreetMap
|
||||
|
||||
‣ <b>Enfocat fora de línia</b>: Planifica i navega pel teu viatge a l'estranger sense necessitat de servei mòbil, cerca punts de referència mentre fas una excursió llunyana, etc. Totes les funcions de l'aplicació estan dissenyades per funcionar fora de línia.
|
||||
‣ <b>Respecte a la privadesa</b>: L'aplicació està dissenyada tenint en compte la privadesa: no identifica persones, no fa seguiment i no recopila informació personal. Sense anuncis.
|
||||
‣ <b>Senzill i polit</b>: funcions essencials fàcils d'utilitzar que simplement funcionen.
|
||||
‣ <b>Estalvia bateria i espai</b>: No consumeix bateria com altres aplicacions de navegació. Els mapes compactes estalvien espai preciós al telèfon.
|
||||
‣ <b>Gratuït i creat per la comunitat</b>: Gent com tu ha ajudat a crear l'aplicació afegint llocs a OpenStreetMap, provant i donant comentaris sobre les funcions i aportant les seves habilitats de desenvolupament i diners.
|
||||
‣ <b>Presa de decisions i finances obertes i transparents, sense ànim de lucre i de codi obert.</b>
|
||||
|
||||
<b>Característiques principals</b>:
|
||||
• Mapes detallats descarregables amb llocs que no estan disponibles amb Google Maps
|
||||
• Mode exterior amb rutes de senderisme destacades, càmpings, fonts d'aigua, pics, corbes de nivell, etc.
|
||||
• Senders per caminar i carrils bici
|
||||
• Punts d'interès com restaurants, gasolineres, hotels, botigues, llocs d'interès i molts més
|
||||
• Cerca per nom, adreça o categoria de punt d'interès
|
||||
• Navegació amb anuncis de veu per caminar, anar amb bicicleta o conduir
|
||||
• Marca els teus llocs preferits amb un sol toc
|
||||
• Articles de la Viquipèdia fora de línia
|
||||
• Capa i indicacions de trànsit de metro
|
||||
• Enregistrament de rutes
|
||||
• Exporta i importa marcadors i rutes en formats KML, KMZ i GPX
|
||||
• Un mode fosc per utilitzar durant la nit
|
||||
• Millora les dades del mapa per a tothom mitjançant un editor bàsic integrat
|
||||
|
||||
<b>La llibertat és aquí</b>
|
||||
Descobreix el teu viatge, navega pel món amb la privadesa i la comunitat al capdavant!
|
||||
@@ -0,0 +1,33 @@
|
||||
En fællesskabdrevet og åben source kortapp, baseret på kortdata fra OpenStreetMap og styrket i forpligtelsen til værdierne gennemsigtighed, privatlivets fred, og non-profit. CoMaps udspringer af Organic Maps, som selv udsprang af Maps.ME.
|
||||
|
||||
Læs mere om grundlaget for projektet og dets udviklingsretnign på <b><i>codeberg.org/comaps</i></b>.
|
||||
Slut dig til fælleskabet og hjælp til med at bygge den bedste kortapp i verden.
|
||||
• Brug appen og fortæl andre om den
|
||||
• Giv feedback anmeld fejl
|
||||
• Opdater kortdata i appen eller på OpenStreetMap-hjemmesiden.
|
||||
|
||||
‣ <b>Offlinefokuseret</b>: Planlæg din rute og find vej i udlandet uden brug af mobildata, søg og find afsidesliggende mål på en afsidesliggende vandretur, mm. Alle funktioner er designet til at fungere uden internetforbindelse.
|
||||
‣ <b>Respekt for privatlivets fred</b>: Appen er designet med henblik på at respektere dit privatliv – den identificerer dig ikke, indeholder ingen sporingsmekanismer, og insamler ingen personlig information. Appen er reklamefri.
|
||||
‣ <b>Enkel og elegant</b>: de essentielle funktioner er nemme at bruge, og de virker bare.
|
||||
‣ <b>Sparer på batteriet og på lagerpladsen</b>: Dræner ikke dit batteri hurtigt, som andre kortapps. De kompakte kortfiler minimerer varigt lagerpladsforbrug.
|
||||
‣ <b>Gratis og bygget i fællesskab</b>: Folk som dig har hjulpet med denne app ved at tilføje steder til OpenStreetMap, ved at teste appens funktioner og give feedback på dem og ved at bidrage til udviklingen af appen med deres tid og penge.
|
||||
‣ <b>Åben og gennemsigtig beslutningstagningsproces og finanser, non-profit, og fuldt ud åben source.</b>
|
||||
|
||||
<b>Hovedfunktioner</b>
|
||||
• Hent detaljerede kort, der indeholder steder som ikke findes i mange kommericelle kort.
|
||||
• En frilufts-tilstand med markede vandrestier, teltpladser, kilder, bjerg- og bakketoppe, højdekonturlinjer, mm.
|
||||
• Gangstier og cykelstier
|
||||
• Steder, der kan besøges, som f.eks. restauranter, tankstationer, hoteller, butikker, seværdigheder og mange andre.
|
||||
• Søg efter stednavn, adresse, eller type af sted.
|
||||
• Gem dine yndlingssteder som bogmærker med et enkelt tryk.
|
||||
• iCloud synkronisering af bogmærker og optagede spor.
|
||||
• Offline artikler fra Wikipedia.
|
||||
• Metro-lag med navigation.
|
||||
• Optagelse af spor.
|
||||
• Eksport og import af bogmærker og spor i formaterne KML, KMZ og GPX.
|
||||
• Mørk tilstand til brug om natten.
|
||||
• Mulighed for at forbedre kortet vha. en indbygget editor.
|
||||
• CarPlay understøttes.
|
||||
|
||||
<b>Friheden er ankommet</b>
|
||||
Opdag din rejse, find vej i verden med privatliv og fællesskab i førersædet!
|
||||
@@ -1,8 +1,10 @@
|
||||
• OpenStreetMap-Daten vom 4. November
|
||||
• Aktualisierte Karten-Icons, inkl. Farben für Unterhaltungs-, Sport- & andere Unternehmen
|
||||
• Informationen zu Steckdosen an EV-Ladestationen
|
||||
• Symbole für Sportzentren, Veranstaltungsorte, Massagesalons, Gästehäuser und einige stillgelegte Unternehmen
|
||||
• Verbesserungen bei der Suche
|
||||
• Behebung eines Absturzes bei der Suche
|
||||
• Verbesserte Sprachführung während der Navigation
|
||||
Weitere Änderungen finden in unseren Codeberg-Versionshinweisen!
|
||||
• OpenStreetMap-Daten vom 9. Dezember
|
||||
• Material 3 Design
|
||||
• Im OSM-Editor können nun Ladestationen hinzugefügt werden
|
||||
• Schuko und Typ E Ladestationen hinzugefügt
|
||||
• Verbesserte Suchvorschläge
|
||||
• Litauische und lettische Sprachankündigungen
|
||||
• Die Fahranweisungen wurden vergrößert
|
||||
• Der Zoomlevel passt sich an die Distanz zur nächsten Abbiegung an
|
||||
• Neue Anordnung der Einstellungen
|
||||
Weitere Einzelheiten auf codeberg.org/comaps/comaps/releases
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
• OpenStreetMap data as of November 4
|
||||
• Recategorized map icons including some new colors for entertainment, sports and other businesses
|
||||
• Display info about available sockets on charging stations
|
||||
• Added bandstands, backless benches and loungers
|
||||
• New icons for different sport centres, event venues, massage salons, guest houses and some disused businesses
|
||||
• Multiple search improvements and crash fix
|
||||
• Improved voice guidance during navigation
|
||||
Check our Codeberg release notes for more changes!
|
||||
• OpenStreetMap data as of December 9
|
||||
• Use Material 3 themes
|
||||
• Support charging sockets in OSM Editor
|
||||
• Added schuko/type-E charge sockets
|
||||
• Improved search results ranking
|
||||
• Enabled Lithuanian and Latvian in voice announcements
|
||||
• Improved size of driving indications
|
||||
• Base zoom level on distance to next turn
|
||||
• Reordered settings
|
||||
More details on codeberg.org/comaps/comaps/releases
|
||||
|
||||
32
android/app/src/fdroid/play/listings/eo/full-description.txt
Normal file
32
android/app/src/fdroid/play/listings/eo/full-description.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
Komunum-gvidata senpaga kaj malfermkoda mapapliko bazita sur OpenStreetMap-datumoj kaj fortigita per komitado al transparencio, privateco kaj ne-lucro. CoMaps estas forko/spin-off de Organic Maps, kiu turne estas forko de Maps.ME.
|
||||
|
||||
Legu plu pri la kialoj por la projekto kaj ĝia direkto ĉe <b><i>codeberg.org/comaps</i></b>.
|
||||
Aliĝu al la komunumo tie kaj helpu fari la plej bonan mapaplikon
|
||||
• Uzu la aplikon kaj disvastigu la vorton pri ĝi
|
||||
• Donu rimarkojn kaj raportu problemojn
|
||||
• Ĝisdatigu mapajn datumojn en la apliko aŭ sur la OpenStreetMap-retejo
|
||||
|
||||
‣ <b>Senkonekta-fokusa</b>: Planu kaj navigu vian vojaĝon eksterlande sen bezono de ĉelulara servico, serĉu vojpunktojn dum malproksima promenado, ktp. Ĉiuj funkcioj de la apliko estas dezajnitaj por funkcii senkonekte.
|
||||
‣ <b>Rispektante Privatecon</b>: La apliko estas dezajnita kun privateco en menso — ne identigas homojn, ne sekvas, kaj ne kolektas personajn informojn. Sen reklamoj.
|
||||
‣ <b>Simpla kaj Perfekta</b>: esencaj, facile uzeblaj funkcioj kiuj simple funkcias.
|
||||
‣ <b>Konservas Vian Baterion kaj Spacon</b>: Ne elĉerpas vian baterion kiel aliaj navigaj aplikaĵoj. Kompaktaj mapoj konservas precian spacon sur via telefono.
|
||||
‣ <b>Sena kaj Konstruita de la Komunumo</b>: Homoj kiel vi helpis konstrui la aplikon per aldonado de lokoj al OpenStreetMap, testado kaj donado de rimarkoj pri funkcioj kaj kontribuado de siaj programadaj kapabloj kaj mono.
|
||||
‣ <b>Malferma kaj Transparenta Decidado kaj Financoj, Ne-lucra kaj Tute Malfermkoda.</b>
|
||||
|
||||
<b>Ĉefaj Funkcioj</b>:
|
||||
• Elŝuteblaj detalegaj mapoj kun lokoj kiuj ne estas disponeblaj per Google Maps
|
||||
• Eksteraj modo kun elstarigitaj promenaj vojoj, kampoj, akvofontoj, pintoj, konturlinioj, ktp
|
||||
• Promenaj vojoj kaj biciklaj vojoj
|
||||
• Interesaj punktoj kiel restoracioj, benzinstacioj, hoteloj, vendejoj, vidindaĵoj kaj multaj aliaj
|
||||
• Serĉo laŭ nomo aŭ adreso aŭ laŭ kategorio de interesaj punktoj
|
||||
• Navigado kun voĉaj anoncoj por promenado, biciklado aŭ veturado
|
||||
• Marku viajn favorajn lokojn per unu tuŝo
|
||||
• Senkonektaj Vikipedio-artikoloj
|
||||
• Metroa transporta tavolo kaj indikoj
|
||||
• Enregistraĵo de vojoj
|
||||
• Eksporto kaj importo de markiloj kaj vojoj en KML, KMZ, GPX formatoj
|
||||
• Malhela modo por uzi nokte
|
||||
• Plibonigu mapajn datumojn por ĉiuj uzante bazan enkonstruitan redaktilon
|
||||
|
||||
<b>Libereco Estas Ĉi Tie</b>
|
||||
Malkovru vian vojaĝon, navigu la mondon kun privateco kaj komunumo en la antaŭa plano!
|
||||
@@ -0,0 +1 @@
|
||||
Facila mapnaviĝado - Malkovru pli de via vojaĝo - Subtenata de la komunumo
|
||||
1
android/app/src/fdroid/play/listings/eo/title.txt
Normal file
1
android/app/src/fdroid/play/listings/eo/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
CoMaps - Migru, Biciklu, Veturigu Eksterrete
|
||||
@@ -1,7 +1,11 @@
|
||||
• Datos OSM del 04/11
|
||||
• Iconos del mapa recategorizados, incluyendo nuevos colores
|
||||
• Visualización de información sobre enchufes disponibles en estaciones de recarga
|
||||
• Adición de iconos para diferentes centros deportivos, lugares de eventos, salones de masajes, posadas y algunos establecimientos comerciales desactivados
|
||||
• Varias mejoras y correcciones de errores en la búsqueda
|
||||
• Mejora en la orientación por voz durante la navegación
|
||||
Más detalles en Codeberg
|
||||
• Datos de OpenStreetMap a fecha 9/12.
|
||||
• Uso de temas Material 3.
|
||||
• Compatibilidad con enchufes de recarga en Editor.
|
||||
• Se añaden enchufes de recarga schuko/tipo E.
|
||||
• Se mejora la búsqueda.
|
||||
• Se habilitan el lituano y el letón en las indicaciones de voz.
|
||||
• Se aumenta el tamaño de las indicaciones de conducción.
|
||||
• Nivel de zoom base según la distancia al siguiente giro.
|
||||
• Se han reordenado los ajustes.
|
||||
|
||||
Más detalles en codeberg.org/comaps/comaps/releases
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
• Données OpenStreetMap au 4 novembre
|
||||
• Recatégorisation des icônes sur la carte avec ajout de nouvelles couleurs pour certains types de lieux
|
||||
• Affichage des prises sur les bornes électriques
|
||||
• Ajout d'icônes pour les centres sportifs, salles d'événements, salon de massage et autres lieux
|
||||
• Multiple améliorations dans la recherche
|
||||
• Correction d'un plantage dans la recherche
|
||||
• Amélioration de la synthèse vocale durant la navigation
|
||||
Plus d'informations sur notre Codeberg
|
||||
• Données OpenStreetMap du 9 Décembre
|
||||
• Utilisation de Material 3
|
||||
• Support de l'édition des bornes de recharge dans l'éditeur OSM
|
||||
• Ajout du type de prise schuko/type-E
|
||||
• Amélioration de l'ordre des résultats de recherche
|
||||
• Ajout du lituanien et du letton dans le guidage vocal
|
||||
• Amélioration de la taille des instructions dans la navigation
|
||||
• Niveau de zoom basé sur la distance jusqu’au prochain virage
|
||||
• Réorganisation des paramètres
|
||||
Plus de détails sur codeberg.org/comaps/comaps/releases
|
||||
|
||||
@@ -1 +1 @@
|
||||
CoMaps - Rando, vélo, conduite hors ligne & privée
|
||||
CoMaps - Randonnée, Vélo, Conduite hors ligne
|
||||
|
||||
10
android/app/src/fdroid/play/listings/hr/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/hr/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• Podaci OpenStreetMap karte od 9. prosinca
|
||||
• Korištenje Material 3 tema
|
||||
• Podrška za utičnice za punjenje u OSM Editoru
|
||||
• Dodane šuko/tip-E utičnice
|
||||
• Poboljšano rangiranje rezultata pretraživanja
|
||||
• Omogućeni litvanski i latvijski jezici u glasovnim najavama
|
||||
• Povećana veličina indikatora vožnje
|
||||
• Razina zumiranja se mijenja ovisno o udaljenosti do sljedećeg skretanja
|
||||
• Promijenjen redoslijed postavki
|
||||
Više detalja na codeberg.org/comaps/comaps/releases
|
||||
@@ -0,0 +1 @@
|
||||
Paprasta ir patogi navigacija – Turiningos kelionės – Vystoma bendruomenės
|
||||
1
android/app/src/fdroid/play/listings/lt/title.txt
Normal file
1
android/app/src/fdroid/play/listings/lt/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
CoMaps – keliaukite atsijungę ir privačiai
|
||||
10
android/app/src/fdroid/play/listings/pl-PL/release-notes.txt
Normal file
10
android/app/src/fdroid/play/listings/pl-PL/release-notes.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
• Dane OpenStreetMap z 9 grudnia
|
||||
• Użycie motywów Material 3
|
||||
• Obsługa gniazd ładowania w Edytorze OSM
|
||||
• Dodane gniazda ładowania schuko/type-E
|
||||
• Poprawiony ranking wyników wyszukiwania
|
||||
• Dodane litewskie i łotewskie komunikaty głosowe
|
||||
• Poprawiony rozmiar znaków drogowych
|
||||
• Poziom powiększenia oparty na odległości do następnego manewru
|
||||
• Zmieniona kolejność ustawień
|
||||
Więcej szczegółów na codeberg.org/comaps/comaps/releases
|
||||
@@ -1,7 +1,10 @@
|
||||
• Dados OSM de 04/11
|
||||
• Ícones do mapa recategorizados, incluindo novas cores
|
||||
• Exibição de informações sobre tomadas disponíveis em eletropostos
|
||||
• Adição de ícones para diferentes centros esportivos, locais de eventos, salões de massagem, pousadas e alguns estabelecimentos comerciais desativados
|
||||
• Diversas melhorias e correção de erro na busca
|
||||
• Melhoria na orientação por voz durante a navegação
|
||||
Confira nossas notas de lançamento no Codeberg para mais detalhes!
|
||||
• Dados OpenStreetMap atualizados em 9 de dezembro
|
||||
• Uso do estilo Material 3
|
||||
• Suporte para tomadas de carregamento no Editor OSM
|
||||
• Adição de tomadas de carregamento Schuko/Tipo E
|
||||
• Melhoria na classificação dos resultados de busca
|
||||
• Adição dos idiomas letão e lituano nas orientações por voz
|
||||
• Melhoria no tamanho das indicações de direção
|
||||
• Nível de zoom baseado em distância até a próxima curva
|
||||
• Configurações reordenadas
|
||||
Mais detalhes em codeberg.org/comaps/comaps/releases
|
||||
|
||||
32
android/app/src/fdroid/play/listings/pt/full-description.txt
Normal file
32
android/app/src/fdroid/play/listings/pt/full-description.txt
Normal file
@@ -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!
|
||||
@@ -0,0 +1 @@
|
||||
Navegação fácil nos mapas - Descubra mais sobre o seu percurso - Feito por todos
|
||||
1
android/app/src/fdroid/play/listings/pt/title.txt
Normal file
1
android/app/src/fdroid/play/listings/pt/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
CoMaps - Mapas e Navegação - Offline e Privada
|
||||
@@ -1,8 +0,0 @@
|
||||
• Карты OpenStreetMap от 4 ноября
|
||||
• Обновлены цвета иконок на карте, добавлены новые цвета для развлечений, спорта, некоторых бизнесов
|
||||
• На зарядных станциях показываются имеющиеся типы разъёмов
|
||||
• Добавлены эстрады, скамейки без спинок и лежаки
|
||||
• Новые иконки для разных спорт центров, массажных салонов, гостевых домов, некоторых закрытых бизнесов
|
||||
• Несколько улучшений и исправлений в поиске
|
||||
• Улучшены голосовые подсказки при навигации
|
||||
Подробнее смотрите на codeberg.org/comaps/comaps/releases
|
||||
@@ -1 +1 @@
|
||||
எளிதான வரைபட வழிசெல் - உங்கள் பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
||||
எளிய வழிகாட்டி - பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
||||
|
||||
1
android/app/src/fdroid/play/listings/ta-IN/title.txt
Normal file
1
android/app/src/fdroid/play/listings/ta-IN/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
இணைவரைபடங்கள் - மலையேறு, வண்டி, தனிமையில் இயக்கு
|
||||
@@ -68,4 +68,4 @@ Por favor, informa de errores, sugiere ideas y únete a nuestra comunidad en el
|
||||
|
||||
<b>La Libertad Está Aquí</b>
|
||||
|
||||
Descubre tu camino, navega el mundo con privacidad y con la comunidad como prioridad.
|
||||
¡Descubre tu camino, navega el mundo con privacidad y con la comunidad como prioridad!
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Paprasta ir patogi navigacija – Turiningos kelionės – Vystoma bendruomenės
|
||||
1
android/app/src/google/play/listings/lt/title.txt
Normal file
1
android/app/src/google/play/listings/lt/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
CoMaps – naviguokite privačiai
|
||||
@@ -0,0 +1,36 @@
|
||||
Aplikacja mapowa tworzona przez społeczność, darmowa i open source, oparta na danych OpenStreetMap, z pełnym naciskiem na transparentność, prywatność i działanie non-profit.
|
||||
|
||||
Dołącz do społeczności i pomóż tworzyć najlepszą aplikację mapową
|
||||
• Korzystaj z aplikacji i polecaj ją innym
|
||||
• Przekazuj opinie i zgłaszaj problemy
|
||||
• Aktualizuj dane mapy w aplikacji lub na stronie OpenStreetMap
|
||||
|
||||
<i>Twoje opinie i oceny na 5 gwiazdek są dla nas najlepszym wsparciem!</i>
|
||||
|
||||
‣ <b>Prosta i dopracowana</b>: najważniejsze, łatwe w użyciu funkcje, które po prostu działają.
|
||||
‣ <b>Skoncentrowana na trybie offline</b>: planuj i nawiguj za granicą bez sieci komórkowej, wyszukuj punkty na odległych szlakach – wszystkie funkcje działają offline.
|
||||
‣ <b>Z poszanowaniem prywatności</b>: aplikacja nie identyfikuje użytkowników, nie śledzi i nie zbiera danych osobowych. Bez reklam.
|
||||
‣ <b>Oszczędza baterię i miejsce</b>: nie zużywa baterii jak inne aplikacje nawigacyjne, a kompaktowe mapy oszczędzają miejsce w telefonie.
|
||||
‣ <b>Darmowa i tworzona przez społeczność</b>: ludzie tacy jak Ty dodają miejsca do OpenStreetMap, testują funkcje, zgłaszają opinie i wspierają projekt.
|
||||
‣ <b>Otwarte i przejrzyste decyzje i finanse, działanie non-profit, pełne open source.</b>
|
||||
|
||||
<b>Główne funkcje</b>:
|
||||
• Pobierane szczegółowe mapy z miejscami, których nie ma w Google Maps
|
||||
• Tryb outdoor ze szlakami, biwakami, źródłami wody, szczytami, warstwicami itp.
|
||||
• Ścieżki piesze i rowerowe
|
||||
• Punkty zainteresowania: restauracje, stacje paliw, hotele, sklepy, atrakcje i wiele innych
|
||||
• Wyszukiwanie po nazwie, adresie lub kategorii
|
||||
• Nawigacja z komunikatami głosowymi dla pieszych, rowerzystów i kierowców
|
||||
• Dodawanie ulubionych miejsc jednym tapnięciem
|
||||
• Artykuły Wikipedii dostępne offline
|
||||
• Warstwa metra i wskazówki dojazdu
|
||||
• Nagrywanie śladu trasy
|
||||
• Eksport i import ulubionych miejsc i tras w formatach KML, KMZ, GPX
|
||||
• Tryb ciemny do używania nocą
|
||||
• Poprawianie danych mapy za pomocą prostego wbudowanego edytora
|
||||
• Obsługa Android Auto
|
||||
|
||||
Zgłaszaj problemy, proponuj pomysły i dołącz do społeczności na stronie <b><i>comaps.app</i></b>.
|
||||
|
||||
<b>Wolność jest tutaj</b>
|
||||
Odkrywaj swoją drogę i nawiguj po świecie z prywatnością i społecznością na pierwszym miejscu!
|
||||
@@ -0,0 +1,36 @@
|
||||
திறந்ததெருவரைபடம் தரவை அடிப்படையாகக் கொண்ட சமூகத்தால் வழிநடத்தப்படும் இலவச & திறந்த மூல வரைபடப் பயன்பாடு, வெளிப்படைத்தன்மை, தனியுரிமை மற்றும் இலாப நோக்கற்ற தன்மை ஆகியவற்றிற்கான அர்ப்பணிப்புடன் வலுப்படுத்தப்பட்டுள்ளது.
|
||||
|
||||
சமூகத்தில் சேர்ந்து சிறந்த வரைபடப் பயன்பாட்டை உருவாக்க உதவுங்கள்
|
||||
• பயன்பாட்டைப் பயன்படுத்தி அதைப் பற்றிய செய்தியைப் பரப்புங்கள்
|
||||
• கருத்துத் தெரிவிக்கவும் சிக்கல்களைப் புகாரளிக்கவும்
|
||||
• பயன்பாட்டில் அல்லது OpenStreetMap வலைத்தளத்தில் வரைபடத் தரவைப் புதுப்பிக்கவும்
|
||||
|
||||
<i>உங்கள் கருத்து மற்றும் 5-நட்சத்திர மதிப்புரைகள் எங்களுக்குச் சிறந்த ஆதரவாகும்!</i>
|
||||
|
||||
‣ <b>எளிமையான மற்றும் மெருகூட்டப்பட்ட</b>: அத்தியாவசியமான பயன்படுத்த எளிதான அம்சங்கள் வேலை செய்கின்றன.
|
||||
‣ <b>ஆஃப்லைனில் கவனம் செலுத்துகிறது</b>: செல்லுலார் சேவை தேவை இல்லாமல் உங்கள் வெளிநாட்டு பயணத்தைத் திட்டமிட்டு வழிநடத்துங்கள், தொலைதூர நடைபயணத்தின்போது வழிப்புள்ளிகளைத் தேடுங்கள் போன்றவை. அனைத்து பயன்பாட்டு செயல்பாடுகளும் ஆஃப்லைனில் வேலை செய்ய வடிவமைக்கப்பட்டுள்ளன.
|
||||
‣ <b>தனியுரிமையை மதித்தல்</b>: பயன்பாடு தனியுரிமையை மனதில் கொண்டு வடிவமைக்கப்பட்டுள்ளது - மக்களை அடையாளம் காணாது, கண்காணிக்காது மற்றும் தனிப்பட்ட தகவல்களைச் சேகரிக்காது. விளம்பரங்கள் இல்லாதது.
|
||||
‣ <b>உங்கள் பேட்டரி மற்றும் இடத்தைச் சேமிக்கிறது</b>: பிற வழிசெலுத்தல் பயன்பாடுகளைப் போல உங்கள் பேட்டரியை வெளியேற்றாது. சிறிய வரைபடங்கள் உங்கள் தொலைபேசியில் விலைமதிப்பற்ற இடத்தைச் சேமிக்கின்றன.
|
||||
‣ <b>இலவசம் மற்றும் சமூகத்தால் உருவாக்கப்பட்டது</b>: உங்களைப் போன்றவர்கள் OpenStreetMap இல் இடங்களைச் சேர்ப்பதன் மூலமும், அம்சங்கள்குறித்து சோதித்துப் பார்த்துக் கருத்து தெரிவிப்பதன் மூலமும், அவர்களின் மேம்பாட்டுத் திறன்கள் மற்றும் பணத்தை பங்களிப்பதன் மூலமும் பயன்பாட்டை உருவாக்க உதவினார்கள்.
|
||||
‣ <b>திறந்த மற்றும் வெளிப்படையான முடிவெடுக்கும் மற்றும் நிதி, இலாப நோக்கற்ற மற்றும் முழுமையாகத் திறந்த மூல.</b>
|
||||
|
||||
<b>முக்கிய பண்புகள்</b>:
|
||||
• கூகிள் வரைபடத்தில் கிடைக்காத இடங்களுடன் பதிவிறக்கம் செய்யக்கூடிய விரிவான வரைபடங்கள்
|
||||
• ஹைகிங் பாதைகள், முகாம் தளங்கள், நீர் ஆதாரங்கள், சிகரங்கள், விளிம்புக் கோடுகள் போன்றவற்றுடன் வெளிப்புற பயன்முறை
|
||||
• நடைபாதைகள் மற்றும் சைக்கிள் பாதைகள்
|
||||
• உணவகங்கள், எரிவாயு நிலையங்கள், ஹோட்டல்கள், கடைகள், பார்வையிடல்கள் மற்றும் பல போன்ற ஆர்வமுள்ள இடங்கள்
|
||||
• பெயர் அல்லது முகவரி அல்லது ஆர்வமுள்ள இட வகைமூலம் தேடுங்கள்
|
||||
• நடைபயிற்சி, சைக்கிள் ஓட்டுதல் அல்லது வாகனம் ஓட்டுவதற்கான குரல் அறிவிப்புகளுடன் வழிசெலுத்தல்
|
||||
• உங்களுக்குப் பிடித்த இடங்களை ஒரே தட்டலில் புக்மார்க் செய்யவும்
|
||||
• ஆஃப்லைன் விக்கிபீடியா கட்டுரைகள்
|
||||
• சுரங்கப்பாதை போக்குவரத்து அடுக்கு மற்றும் திசைகள்
|
||||
• பதிவுசெய்தலைக் கண்காணிக்கவும்
|
||||
• KML, KMZ, GPX வடிவங்களில் புக்மார்க்குகள் மற்றும் தடங்களை ஏற்றுமதி செய்து இறக்குமதி செய்யவும்
|
||||
• இரவில் பயன்படுத்த ஒரு இருண்ட பயன்முறை
|
||||
• அடிப்படை உள்ளமைக்கப்பட்ட எடிட்டரைப் பயன்படுத்தி அனைவருக்கும் வரைபடத் தரவை மேம்படுத்தவும்
|
||||
• ஆண்டாய்டு தானி ஆதரவு
|
||||
|
||||
பயன்பாட்டு சிக்கல்களைப் புகாரளிக்கவும், யோசனைகளைப் பரிந்துரைக்கவும் மற்றும் எங்கள் சமூகத்தில் சேரவும் <b><i>comaps.app</i></b> வலைத்தளம்.
|
||||
|
||||
<b>சுதந்திரம் இங்கே உள்ளது</b>
|
||||
உங்கள் பயணத்தைக் கண்டறியவும், தனியுரிமை மற்றும் சமூகத்தை முன்னணியில் வைத்து உலகை வழிநடத்தவும்!
|
||||
@@ -1 +1 @@
|
||||
எளிதான வரைபட வழிசெல் - உங்கள் பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
||||
எளிய வழிகாட்டி - பயணத்தை மேலும் கண்டறி - சமூகத்தால் இயக்கப்படுகிறது
|
||||
|
||||
1
android/app/src/google/play/listings/ta-IN/title.txt
Normal file
1
android/app/src/google/play/listings/ta-IN/title.txt
Normal file
@@ -0,0 +1 @@
|
||||
இணைவரைபடங்கள் - தனியுரிமை
|
||||
@@ -28,7 +28,6 @@ import com.github.mikephil.charting.formatter.IAxisValueFormatter;
|
||||
import com.github.mikephil.charting.highlight.Highlight;
|
||||
import com.github.mikephil.charting.listener.OnChartValueSelectedListener;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
@@ -253,7 +253,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
||||
|
||||
mProgress.setMax(bytes);
|
||||
// Start progress at 1% according to M3 guidelines
|
||||
mProgress.setProgressCompat(bytes/100, true);
|
||||
mProgress.setProgressCompat(bytes / 100, true);
|
||||
}
|
||||
else
|
||||
finishFilesDownload(bytes);
|
||||
@@ -372,7 +372,7 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
||||
mTvMessage.setText(getString(R.string.downloading_country_can_proceed, item.name, fileSizeString));
|
||||
mProgress.setMax((int) item.totalSize);
|
||||
// Start progress at 1% according to M3 guidelines
|
||||
mProgress.setProgressCompat((int) (item.totalSize/100), true);
|
||||
mProgress.setProgressCompat((int) (item.totalSize / 100), true);
|
||||
|
||||
mCountryDownloadListenerSlot = MapManager.nativeSubscribe(mCountryDownloadListener);
|
||||
MapManagerHelper.startDownload(mCurrentCountry);
|
||||
@@ -424,17 +424,17 @@ public class DownloadResourcesLegacyActivity extends BaseMwmFragmentActivity
|
||||
default -> throw new AssertionError("Unexpected result code = " + result);
|
||||
};
|
||||
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(titleId)
|
||||
.setMessage(messageId)
|
||||
.setCancelable(true)
|
||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
||||
.setPositiveButton(R.string.try_again,
|
||||
(dialog, which) -> {
|
||||
setAction(TRY_AGAIN);
|
||||
onTryAgainClicked();
|
||||
})
|
||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||
.show();
|
||||
mAlertDialog = new MaterialAlertDialogBuilder(this, R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(titleId)
|
||||
.setMessage(messageId)
|
||||
.setCancelable(true)
|
||||
.setOnCancelListener((dialog) -> setAction(PAUSE))
|
||||
.setPositiveButton(R.string.try_again,
|
||||
(dialog, which) -> {
|
||||
setAction(TRY_AGAIN);
|
||||
onTryAgainClicked();
|
||||
})
|
||||
.setOnDismissListener(dialog -> mAlertDialog = null)
|
||||
.show();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,6 @@ import androidx.core.content.ContextCompat;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.fragment.app.FragmentFactory;
|
||||
import androidx.fragment.app.FragmentManager;
|
||||
import androidx.fragment.app.FragmentTransaction;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
@@ -108,6 +107,7 @@ import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.search.SearchEngine;
|
||||
import app.organicmaps.sdk.settings.RoadType;
|
||||
import app.organicmaps.sdk.settings.UnitLocale;
|
||||
import app.organicmaps.sdk.sound.TtsPlayer;
|
||||
import app.organicmaps.sdk.util.Config;
|
||||
import app.organicmaps.sdk.util.LocationUtils;
|
||||
import app.organicmaps.sdk.util.PowerManagment;
|
||||
@@ -133,7 +133,6 @@ import com.google.android.material.appbar.MaterialToolbar;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.floatingactionbutton.FloatingActionButton;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Objects;
|
||||
|
||||
@@ -1814,6 +1813,26 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
return false;
|
||||
}
|
||||
|
||||
private void deliverTtsMessage()
|
||||
{
|
||||
if (Config.isTtsMessageDelivered())
|
||||
return;
|
||||
|
||||
String languageDisplayName = TtsPlayer.INSTANCE.getLanguageDisplayName();
|
||||
|
||||
if (languageDisplayName != null)
|
||||
{
|
||||
String navigationStartMessage = getResources().getString(R.string.navigation_start_tts_message);
|
||||
navigationStartMessage += languageDisplayName;
|
||||
Toast.makeText(this, navigationStartMessage, Toast.LENGTH_LONG).show();
|
||||
}
|
||||
else
|
||||
Toast.makeText(this, getResources().getString(R.string.navigation_start_tts_disabled_message), Toast.LENGTH_LONG)
|
||||
.show();
|
||||
|
||||
Config.setTtsMessageDelivered();
|
||||
}
|
||||
|
||||
private boolean showStartPointNotice()
|
||||
{
|
||||
final RoutingController controller = RoutingController.get();
|
||||
@@ -2190,6 +2209,8 @@ public class MwmActivity extends BaseMwmFragmentActivity
|
||||
if (!showRoutingDisclaimer())
|
||||
return;
|
||||
|
||||
deliverTtsMessage();
|
||||
|
||||
closeFloatingPanels();
|
||||
setFullscreen(false);
|
||||
RoutingController.get().start();
|
||||
|
||||
@@ -38,8 +38,9 @@ public class OsmUploadWork extends Worker
|
||||
{
|
||||
final Constraints c = new Constraints.Builder().setRequiredNetworkType(NetworkType.CONNECTED).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);
|
||||
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();
|
||||
|
||||
@@ -17,7 +17,6 @@ import androidx.annotation.NonNull;
|
||||
import androidx.documentfile.provider.DocumentFile;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.util.log.Logger;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -10,7 +10,6 @@ import androidx.fragment.app.DialogFragment;
|
||||
|
||||
public class BaseMwmDialogFragment extends DialogFragment
|
||||
{
|
||||
|
||||
protected int getStyle()
|
||||
{
|
||||
return STYLE_NORMAL;
|
||||
|
||||
@@ -282,11 +282,13 @@ public class BookmarksListFragment extends BaseMwmRecyclerFragment<ConcatAdapter
|
||||
{
|
||||
if (isEmptySearchResults())
|
||||
{
|
||||
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||
requirePlaceholder().setContent(R.string.search_not_found, R.string.search_not_found_query,
|
||||
R.drawable.ic_search_fail);
|
||||
}
|
||||
else if (isEmpty())
|
||||
{
|
||||
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message, R.drawable.ic_bookmarks);
|
||||
requirePlaceholder().setContent(R.string.bookmarks_empty_list_title, R.string.bookmarks_empty_list_message,
|
||||
R.drawable.ic_bookmarks);
|
||||
}
|
||||
|
||||
boolean isEmptyRecycler = isEmpty() || isEmptySearchResults();
|
||||
|
||||
@@ -23,7 +23,6 @@ import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.recycler.RecyclerClickListener;
|
||||
import app.organicmaps.widget.recycler.RecyclerLongClickListener;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
@@ -458,10 +457,12 @@ public class Holders
|
||||
|
||||
String formattedDesc = desc.replace("\n", "<br>");
|
||||
Spanned spannedDesc = Utils.fromHtml(formattedDesc);
|
||||
if (!TextUtils.isEmpty(spannedDesc)) {
|
||||
if (!TextUtils.isEmpty(spannedDesc))
|
||||
{
|
||||
mDescText.setText(spannedDesc);
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
mDescText.setText(R.string.list_description_empty);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ public final class IntentUtils
|
||||
}
|
||||
|
||||
// https://developer.android.com/reference/androidx/car/app/CarContext#startCarApp(android.content.Intent)
|
||||
private static void processNavigationIntent(@NonNull CarContext carContext,
|
||||
@NonNull Renderer surfaceRenderer, @NonNull Intent intent)
|
||||
private static void processNavigationIntent(@NonNull CarContext carContext, @NonNull Renderer surfaceRenderer,
|
||||
@NonNull Intent intent)
|
||||
{
|
||||
// TODO (AndrewShkrob): This logic will need to be revised when we introduce support for adding stops during
|
||||
// navigation or route planning. Skip navigation intents during navigation
|
||||
|
||||
@@ -31,7 +31,7 @@ public final class RoutingHelpers
|
||||
default -> Distance.UNIT_METERS;
|
||||
};
|
||||
|
||||
return Distance.create(distance.mDistance, displayUnit);
|
||||
return Distance.create(distance.mDistance, displayUnit);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -52,7 +52,7 @@ public final class RoutingHelpers
|
||||
default -> LaneDirection.SHAPE_UNKNOWN;
|
||||
};
|
||||
|
||||
return LaneDirection.create(shape, isRecommended);
|
||||
return LaneDirection.create(shape, isRecommended);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -77,7 +77,7 @@ public final class RoutingHelpers
|
||||
case EXIT_HIGHWAY_TO_LEFT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_LEFT;
|
||||
case EXIT_HIGHWAY_TO_RIGHT -> Maneuver.TYPE_OFF_RAMP_SLIGHT_RIGHT;
|
||||
};
|
||||
final Maneuver.Builder builder = new Maneuver.Builder(maneuverType);
|
||||
final Maneuver.Builder builder = new Maneuver.Builder(maneuverType);
|
||||
if (maneuverType == Maneuver.TYPE_ROUNDABOUT_ENTER_AND_EXIT_CCW)
|
||||
builder.setRoundaboutExitNumber(roundaboutExitNum > 0 ? roundaboutExitNum : 1);
|
||||
builder.setIcon(new CarIcon.Builder(createManeuverIcon(context, carDirection, roundaboutExitNum)).build());
|
||||
@@ -85,7 +85,8 @@ public final class RoutingHelpers
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private static IconCompat createManeuverIcon(@NonNull final CarContext context, @NonNull CarDirection carDirection, int roundaboutExitNum)
|
||||
private static IconCompat createManeuverIcon(@NonNull final CarContext context, @NonNull CarDirection carDirection,
|
||||
int roundaboutExitNum)
|
||||
{
|
||||
if (!CarDirection.isRoundAbout(carDirection) || roundaboutExitNum == 0)
|
||||
{
|
||||
|
||||
@@ -39,8 +39,7 @@ public final class UiHelpers
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static ActionStrip createMapActionStrip(@NonNull CarContext context,
|
||||
@NonNull Renderer surfaceRenderer)
|
||||
public static ActionStrip createMapActionStrip(@NonNull CarContext context, @NonNull Renderer surfaceRenderer)
|
||||
{
|
||||
final CarIcon iconPlus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_plus)).build();
|
||||
final CarIcon iconMinus = new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_minus)).build();
|
||||
@@ -59,15 +58,13 @@ public final class UiHelpers
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static MapController createMapController(@NonNull CarContext context,
|
||||
@NonNull Renderer surfaceRenderer)
|
||||
public static MapController createMapController(@NonNull CarContext context, @NonNull Renderer surfaceRenderer)
|
||||
{
|
||||
return new MapController.Builder().setMapActionStrip(createMapActionStrip(context, surfaceRenderer)).build();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Action createSettingsAction(@NonNull BaseMapScreen mapScreen,
|
||||
@NonNull Renderer surfaceRenderer)
|
||||
public static Action createSettingsAction(@NonNull BaseMapScreen mapScreen, @NonNull Renderer surfaceRenderer)
|
||||
{
|
||||
return createSettingsAction(mapScreen, surfaceRenderer, null);
|
||||
}
|
||||
@@ -81,8 +78,7 @@ public final class UiHelpers
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private static Action createSettingsAction(@NonNull BaseMapScreen mapScreen,
|
||||
@NonNull Renderer surfaceRenderer,
|
||||
private static Action createSettingsAction(@NonNull BaseMapScreen mapScreen, @NonNull Renderer surfaceRenderer,
|
||||
@Nullable OnScreenResultListener onScreenResultListener)
|
||||
{
|
||||
final CarContext context = mapScreen.getCarContext();
|
||||
@@ -123,8 +119,7 @@ public final class UiHelpers
|
||||
return null;
|
||||
|
||||
final Row.Builder builder = new Row.Builder();
|
||||
builder.setImage(
|
||||
new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_opening_hours)).build());
|
||||
builder.setImage(new CarIcon.Builder(IconCompat.createWithResource(context, R.drawable.ic_opening_hours)).build());
|
||||
|
||||
if (isEmptyTT)
|
||||
builder.setTitle(ohStr);
|
||||
@@ -177,7 +172,7 @@ public final class UiHelpers
|
||||
{
|
||||
case LocationState.PENDING_POSITION, LocationState.NOT_FOLLOW_NO_POSITION ->
|
||||
drawableRes = R.drawable.ic_location_off;
|
||||
case LocationState.NOT_FOLLOW -> drawableRes = R.drawable.ic_not_follow;
|
||||
case LocationState.NOT_FOLLOW -> drawableRes = R.drawable.ic_location_crosshair;
|
||||
case LocationState.FOLLOW ->
|
||||
{
|
||||
drawableRes = R.drawable.ic_follow;
|
||||
|
||||
@@ -125,7 +125,8 @@ public class EditTextDialogFragment extends BaseMwmDialogFragment
|
||||
|
||||
positiveButton.setOnClickListener(view -> {
|
||||
final String result = mEtInput.getText().toString();
|
||||
if (validateInput(requireActivity(), result)) {
|
||||
if (validateInput(requireActivity(), result))
|
||||
{
|
||||
processInput(result);
|
||||
editTextDialog.dismiss();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@ import android.location.Location;
|
||||
import android.text.TextUtils;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import app.organicmaps.MwmActivity;
|
||||
@@ -49,7 +48,8 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
||||
@Override
|
||||
public void onStatusChanged(List<MapManager.StorageCallbackData> data)
|
||||
{
|
||||
if (mCurrentCountry == null) {
|
||||
if (mCurrentCountry == null)
|
||||
{
|
||||
updateOfflineExplanationVisibility();
|
||||
return;
|
||||
}
|
||||
@@ -109,10 +109,13 @@ public class OnmapDownloader implements MwmActivity.LeftAnimationTrackListener
|
||||
return enqueued || progress || applying;
|
||||
}
|
||||
|
||||
private void updateOfflineExplanationVisibility() {
|
||||
if (mOfflineExplanation == null) return;
|
||||
private void updateOfflineExplanationVisibility()
|
||||
{
|
||||
if (mOfflineExplanation == null)
|
||||
return;
|
||||
// hide once threshold reached; safe to call repeatedly.
|
||||
app.organicmaps.util.UiUtils.showIf(MapManager.nativeGetDownloadedCount() < (DEFAULT_MAP_BASELINE + HIDE_THRESHOLD), mOfflineExplanation);
|
||||
app.organicmaps.util.UiUtils.showIf(MapManager.nativeGetDownloadedCount() < (DEFAULT_MAP_BASELINE + HIDE_THRESHOLD),
|
||||
mOfflineExplanation);
|
||||
}
|
||||
|
||||
private void updateProgressState(boolean shouldAutoDownload)
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package app.organicmaps.editor;
|
||||
|
||||
import static android.view.View.INVISIBLE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
@@ -13,14 +15,12 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.widget.GridLayout;
|
||||
import android.widget.Toast;
|
||||
import androidx.annotation.CallSuper;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import app.organicmaps.R;
|
||||
@@ -42,9 +42,9 @@ import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.InputUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.card.MaterialCardView;
|
||||
import com.google.android.material.dialog.MaterialAlertDialogBuilder;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.google.android.material.textfield.TextInputLayout;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
@@ -115,9 +115,9 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
private MaterialTextView mPhone;
|
||||
private MaterialButton mEditPhoneLink;
|
||||
private MaterialTextView mCuisine;
|
||||
private SwitchCompat mWifi;
|
||||
private MaterialSwitch mWifi;
|
||||
private MaterialTextView mSelfService;
|
||||
private SwitchCompat mOutdoorSeating;
|
||||
private MaterialSwitch mOutdoorSeating;
|
||||
|
||||
// Default Metadata entries.
|
||||
private static final class MetadataEntry
|
||||
@@ -353,8 +353,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
{
|
||||
hasChargeSockets = hasChargeSockets || (type == Metadata.MetadataType.FMD_CHARGE_SOCKETS.toInt());
|
||||
}
|
||||
// Hide socket until https://codeberg.org/comaps/comaps/issues/2368 is fixed
|
||||
//UiUtils.showIf(hasChargeSockets, mCardChargingStation);
|
||||
UiUtils.showIf(hasChargeSockets, mCardChargingStation);
|
||||
|
||||
setCardVisibility(mCardDetails, mDetailsBlocks, editableDetails);
|
||||
setCardVisibility(mCardSocialMedia, mSocialMediaBlocks, editableDetails);
|
||||
@@ -396,24 +395,26 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
typeBtns.removeAllViews();
|
||||
|
||||
List<String> SOCKET_TYPES = Arrays.stream(getResources().getStringArray(R.array.charge_socket_types)).toList();
|
||||
for (String socket : SOCKET_TYPES)
|
||||
for (String socketType : SOCKET_TYPES)
|
||||
{
|
||||
ChargeSocketDescriptor socket = new ChargeSocketDescriptor(socketType, 0, 0);
|
||||
|
||||
MaterialButton btn = (MaterialButton) inflater.inflate(R.layout.button_socket_type, typeBtns, false);
|
||||
|
||||
btn.setTag(R.id.socket_type, socket);
|
||||
btn.setTag(R.id.socket_type, socket.type());
|
||||
|
||||
// load SVG icon converted into VectorDrawable in res/drawable
|
||||
@SuppressLint("DiscouragedApi")
|
||||
int resIconId =
|
||||
getResources().getIdentifier("ic_charge_socket_" + socket, "drawable", requireContext().getPackageName());
|
||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
||||
requireContext().getPackageName());
|
||||
if (resIconId != 0)
|
||||
{
|
||||
btn.setIcon(getResources().getDrawable(resIconId));
|
||||
}
|
||||
|
||||
@SuppressLint("DiscouragedApi")
|
||||
int resTypeId =
|
||||
getResources().getIdentifier("charge_socket_" + socket, "string", requireContext().getPackageName());
|
||||
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
|
||||
requireContext().getPackageName());
|
||||
if (resTypeId != 0)
|
||||
{
|
||||
btn.setText(getResources().getString(resTypeId));
|
||||
@@ -461,13 +462,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
// Add a TextWatcher to validate on text change
|
||||
countView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
public void afterTextChanged(Editable s)
|
||||
{
|
||||
validatePositiveField(s.toString(), countInputLayout);
|
||||
}
|
||||
});
|
||||
@@ -482,13 +486,16 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
// Add a TextWatcher to validate on text change
|
||||
powerView.addTextChangedListener(new TextWatcher() {
|
||||
@Override
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after) {}
|
||||
public void beforeTextChanged(CharSequence s, int start, int count, int after)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count) {}
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
{}
|
||||
|
||||
@Override
|
||||
public void afterTextChanged(Editable s) {
|
||||
public void afterTextChanged(Editable s)
|
||||
{
|
||||
validatePositiveField(s.toString(), powerInputLayout);
|
||||
}
|
||||
});
|
||||
@@ -496,74 +503,82 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
return new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_socket)
|
||||
.setView(dialogView)
|
||||
.setPositiveButton(R.string.save,
|
||||
(dialog, which) -> {
|
||||
String socketType = "";
|
||||
for (MaterialButton b : buttonList)
|
||||
{
|
||||
if (b.isChecked())
|
||||
{
|
||||
socketType = b.getTag(R.id.socket_type).toString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
.setPositiveButton(
|
||||
R.string.save,
|
||||
(dialog, which) -> {
|
||||
String socketType = "";
|
||||
for (MaterialButton b : buttonList)
|
||||
{
|
||||
if (b.isChecked())
|
||||
{
|
||||
socketType = b.getTag(R.id.socket_type).toString();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
int countValue = 0; // 0 means 'unknown count'
|
||||
try
|
||||
{
|
||||
countValue = Integer.parseInt(countView.getText().toString());
|
||||
}
|
||||
catch (NumberFormatException ignored)
|
||||
{
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
||||
}
|
||||
int countValue = 0; // 0 means 'unknown count'
|
||||
try
|
||||
{
|
||||
countValue = Integer.parseInt(countView.getText().toString());
|
||||
}
|
||||
catch (NumberFormatException ignored)
|
||||
{
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
||||
}
|
||||
|
||||
if (countValue < 0)
|
||||
{
|
||||
countValue = 0;
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
||||
}
|
||||
if (countValue < 0)
|
||||
{
|
||||
countValue = 0;
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid count value for socket:" + countView.getText().toString());
|
||||
}
|
||||
|
||||
double powerValue = 0; // 0 means 'unknown power'
|
||||
try
|
||||
{
|
||||
powerValue = Double.parseDouble(powerView.getText().toString());
|
||||
}
|
||||
catch (NumberFormatException ignored)
|
||||
{
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
||||
}
|
||||
double powerValue = 0; // 0 means 'unknown power'
|
||||
try
|
||||
{
|
||||
powerValue = Double.parseDouble(powerView.getText().toString());
|
||||
}
|
||||
catch (NumberFormatException ignored)
|
||||
{
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
||||
}
|
||||
|
||||
if (powerValue < 0)
|
||||
{
|
||||
powerValue = 0;
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
||||
}
|
||||
if (powerValue < 0)
|
||||
{
|
||||
powerValue = 0;
|
||||
Logger.w(CHARGE_SOCKETS_TAG, "Invalid power value for socket:" + powerView.getText().toString());
|
||||
}
|
||||
|
||||
ChargeSocketDescriptor socket =
|
||||
new ChargeSocketDescriptor(socketType, countValue, powerValue);
|
||||
ChargeSocketDescriptor socket = new ChargeSocketDescriptor(socketType, countValue, powerValue);
|
||||
|
||||
updateChargeSockets(socketIndex, socket);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, (dialog, which) -> { dialog.dismiss(); });
|
||||
updateChargeSockets(socketIndex, socket);
|
||||
})
|
||||
.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.dismiss());
|
||||
}
|
||||
|
||||
// Helper method for validation logic
|
||||
private boolean validatePositiveField(String text, TextInputLayout layout) {
|
||||
if (text.isEmpty()) {
|
||||
private boolean validatePositiveField(String text, TextInputLayout layout)
|
||||
{
|
||||
if (text.isEmpty())
|
||||
{
|
||||
layout.setError(null); // No error if empty (assuming 0 is the default)
|
||||
return true;
|
||||
}
|
||||
try {
|
||||
try
|
||||
{
|
||||
double value = Double.parseDouble(text);
|
||||
if (value < 0) {
|
||||
if (value < 0)
|
||||
{
|
||||
layout.setError(getString(R.string.error_value_must_be_positive));
|
||||
return false;
|
||||
} else {
|
||||
layout.setError(null);
|
||||
return true;
|
||||
}
|
||||
} catch (NumberFormatException e) {
|
||||
else
|
||||
{
|
||||
layout.setError(null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
catch (NumberFormatException e)
|
||||
{
|
||||
layout.setError(getString(R.string.error_invalid_number));
|
||||
return false;
|
||||
}
|
||||
@@ -583,7 +598,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
{
|
||||
sockets[socketIndex] = socket;
|
||||
}
|
||||
else {
|
||||
else
|
||||
{
|
||||
List<ChargeSocketDescriptor> list = new ArrayList<>(Arrays.asList(sockets));
|
||||
list.add(socket);
|
||||
sockets = list.toArray(new ChargeSocketDescriptor[0]);
|
||||
@@ -615,7 +631,7 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
|
||||
// load SVG icon converted into VectorDrawable in res/drawable
|
||||
@SuppressLint("DiscouragedApi")
|
||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.type(), "drawable",
|
||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
||||
requireContext().getPackageName());
|
||||
if (resIconId != 0)
|
||||
{
|
||||
@@ -623,8 +639,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
}
|
||||
|
||||
@SuppressLint("DiscouragedApi")
|
||||
int resTypeId =
|
||||
getResources().getIdentifier("charge_socket_" + socket.type(), "string", requireContext().getPackageName());
|
||||
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
|
||||
requireContext().getPackageName());
|
||||
if (resTypeId != 0)
|
||||
{
|
||||
type.setText(resTypeId);
|
||||
@@ -635,23 +651,24 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
DecimalFormat df = new DecimalFormat("#.##");
|
||||
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
||||
}
|
||||
else if (socket.ignorePower())
|
||||
{
|
||||
power.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
if (socket.count() != 0)
|
||||
{
|
||||
count.setText(getString(R.string.count_label, socket.count()));
|
||||
}
|
||||
|
||||
itemView.setOnClickListener(v -> {
|
||||
buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show();
|
||||
});
|
||||
itemView.setOnClickListener(
|
||||
v -> buildChargeSocketDialog(currentIndex, socket.type(), socket.count(), socket.power()).show());
|
||||
socketsGrid.addView(itemView);
|
||||
}
|
||||
|
||||
// add a 'new item' button at the end, to create new sockets
|
||||
View btnNewItemView = inflater.inflate(R.layout.button_new_item, socketsGrid, false);
|
||||
btnNewItemView.setOnClickListener(v -> {
|
||||
buildChargeSocketDialog(-1, "unknown", -1, -1).show();
|
||||
});
|
||||
btnNewItemView.setOnClickListener(v -> buildChargeSocketDialog(-1, "unknown", -1, -1).show());
|
||||
socketsGrid.addView(btnNewItemView);
|
||||
}
|
||||
|
||||
@@ -791,9 +808,8 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
View lineContactBlock =
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_LINE, R.id.block_line, R.drawable.ic_line_white,
|
||||
R.string.editor_line_social_network, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
View blueskyContactBlock =
|
||||
initBlock(view, Metadata.MetadataType.FMD_CONTACT_BLUESKY, R.id.block_bluesky, R.drawable.ic_bluesky,
|
||||
R.string.bluesky, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
View blueskyContactBlock = initBlock(view, Metadata.MetadataType.FMD_CONTACT_BLUESKY, R.id.block_bluesky,
|
||||
R.drawable.ic_bluesky, R.string.bluesky, InputType.TYPE_TEXT_VARIATION_URI);
|
||||
View operatorBlock = initBlock(view, Metadata.MetadataType.FMD_OPERATOR, R.id.block_operator,
|
||||
R.drawable.ic_operator, R.string.editor_operator, 0);
|
||||
|
||||
@@ -1025,14 +1041,15 @@ public class EditorFragment extends BaseMwmFragment implements View.OnClickListe
|
||||
private void placeDisused()
|
||||
{
|
||||
new MaterialAlertDialogBuilder(requireActivity(), R.style.MwmTheme_AlertDialog)
|
||||
.setTitle(R.string.editor_mark_business_vacant_title)
|
||||
.setMessage(R.string.editor_mark_business_vacant_description)
|
||||
.setPositiveButton(R.string.editor_submit, (dlg, which) -> {
|
||||
Editor.nativeMarkPlaceAsDisused();
|
||||
mParent.processEditedFeatures();
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show();
|
||||
.setTitle(R.string.editor_mark_business_vacant_title)
|
||||
.setMessage(R.string.editor_mark_business_vacant_description)
|
||||
.setPositiveButton(R.string.editor_submit,
|
||||
(dlg, which) -> {
|
||||
Editor.nativeMarkPlaceAsDisused();
|
||||
mParent.processEditedFeatures();
|
||||
})
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show();
|
||||
}
|
||||
|
||||
private void commitPlaceDoesntExists(@NonNull String text)
|
||||
|
||||
@@ -1,16 +1,19 @@
|
||||
package app.organicmaps.editor;
|
||||
|
||||
import android.content.res.ColorStateList;
|
||||
import android.text.method.LinkMovementMethod;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.editor.data.FeatureCategory;
|
||||
import app.organicmaps.sdk.util.StringUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.textfield.TextInputEditText;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
@@ -65,8 +68,7 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
||||
}
|
||||
case TYPE_FOOTER ->
|
||||
{
|
||||
return new FooterViewHolder(inflater.inflate(R.layout.item_feature_category_footer, parent, false),
|
||||
mFragment);
|
||||
return new FooterViewHolder(inflater.inflate(R.layout.item_feature_category_footer, parent, false), mFragment);
|
||||
}
|
||||
default -> throw new IllegalArgumentException("Unsupported viewType: " + viewType);
|
||||
}
|
||||
@@ -119,7 +121,7 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
||||
protected static class FooterViewHolder extends RecyclerView.ViewHolder
|
||||
{
|
||||
private final TextInputEditText mNoteEditText;
|
||||
private final View mSendNoteButton;
|
||||
private final MaterialButton mSendNoteButton;
|
||||
|
||||
FooterViewHolder(@NonNull View itemView, @NonNull FooterListener listener)
|
||||
{
|
||||
@@ -129,6 +131,24 @@ public class FeatureCategoryAdapter extends RecyclerView.Adapter<RecyclerView.Vi
|
||||
mNoteEditText = itemView.findViewById(R.id.note_edit_text);
|
||||
mSendNoteButton = itemView.findViewById(R.id.send_note_button);
|
||||
mSendNoteButton.setOnClickListener(v -> listener.onSendNoteClicked());
|
||||
final ColorStateList bgButtonColor = new ColorStateList(
|
||||
new int[][] {
|
||||
new int[] {android.R.attr.state_enabled}, // enabled
|
||||
new int[] {-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[] {ContextCompat.getColor(mSendNoteButton.getContext(), R.color.base_accent),
|
||||
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_disabled)});
|
||||
final ColorStateList textButtonColor = new ColorStateList(
|
||||
new int[][] {
|
||||
new int[] {android.R.attr.state_enabled}, // enabled
|
||||
new int[] {-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[] {ContextCompat.getColor(mSendNoteButton.getContext(),
|
||||
UiUtils.getStyledResourceId(mSendNoteButton.getContext(),
|
||||
android.R.attr.textColorPrimaryInverse)),
|
||||
ContextCompat.getColor(mSendNoteButton.getContext(), R.color.button_accent_text_disabled)});
|
||||
mSendNoteButton.setBackgroundTintList(bgButtonColor);
|
||||
mSendNoteButton.setTextColor(textButtonColor);
|
||||
mNoteEditText.addTextChangedListener(new StringUtils.SimpleTextWatcher() {
|
||||
@Override
|
||||
public void onTextChanged(CharSequence s, int start, int before, int count)
|
||||
|
||||
@@ -2,19 +2,16 @@ 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;
|
||||
import com.google.android.material.timepicker.MaterialTimePicker;
|
||||
import com.google.android.material.timepicker.TimeFormat;
|
||||
|
||||
public class FromToTimePicker
|
||||
{
|
||||
@@ -32,18 +29,11 @@ public class FromToTimePicker
|
||||
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,
|
||||
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);
|
||||
FromToTimePicker timePicker = new FromToTimePicker(fragment, listener, fromTime, toTime, id);
|
||||
|
||||
if (startWithToTime)
|
||||
timePicker.showToTimePicker();
|
||||
@@ -51,11 +41,8 @@ public class FromToTimePicker
|
||||
timePicker.showFromTimePicker();
|
||||
}
|
||||
|
||||
private FromToTimePicker(@NonNull Fragment fragment,
|
||||
@NonNull FromToTimePicker.OnPickListener listener,
|
||||
@NonNull HoursMinutes fromTime,
|
||||
@NonNull HoursMinutes toTime,
|
||||
int id)
|
||||
private FromToTimePicker(@NonNull Fragment fragment, @NonNull FromToTimePicker.OnPickListener listener,
|
||||
@NonNull HoursMinutes fromTime, @NonNull HoursMinutes toTime, int id)
|
||||
{
|
||||
mActivity = fragment.requireActivity();
|
||||
mFragmentManager = fragment.getChildFragmentManager();
|
||||
@@ -100,15 +87,12 @@ public class FromToTimePicker
|
||||
|
||||
private MaterialTimePicker buildFromTimePicker()
|
||||
{
|
||||
MaterialTimePicker timePicker = buildTimePicker(mFromTime,
|
||||
mResources.getString(R.string.editor_time_from),
|
||||
mResources.getString(R.string.next_button),
|
||||
null);
|
||||
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 ->
|
||||
{
|
||||
timePicker.addOnPositiveButtonClickListener(view -> {
|
||||
mIsFromTimePicked = true;
|
||||
saveState(timePicker, true);
|
||||
mFromTimePicker = null;
|
||||
@@ -122,13 +106,10 @@ public class FromToTimePicker
|
||||
|
||||
private MaterialTimePicker buildToTimePicker()
|
||||
{
|
||||
MaterialTimePicker timePicker = buildTimePicker(mToTime,
|
||||
mResources.getString(R.string.editor_time_to),
|
||||
null,
|
||||
MaterialTimePicker timePicker = buildTimePicker(mToTime, mResources.getString(R.string.editor_time_to), null,
|
||||
mResources.getString(R.string.back));
|
||||
|
||||
timePicker.addOnNegativeButtonClickListener(view ->
|
||||
{
|
||||
timePicker.addOnNegativeButtonClickListener(view -> {
|
||||
saveState(timePicker, false);
|
||||
mToTimePicker = null;
|
||||
if (mIsFromTimePicked)
|
||||
@@ -137,8 +118,7 @@ public class FromToTimePicker
|
||||
finishTimePicking(false);
|
||||
});
|
||||
|
||||
timePicker.addOnPositiveButtonClickListener(view ->
|
||||
{
|
||||
timePicker.addOnPositiveButtonClickListener(view -> {
|
||||
saveState(timePicker, false);
|
||||
finishTimePicking(true);
|
||||
});
|
||||
@@ -149,18 +129,18 @@ public class FromToTimePicker
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private MaterialTimePicker buildTimePicker(@NonNull HoursMinutes time,
|
||||
@NonNull String title,
|
||||
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);
|
||||
MaterialTimePicker.Builder builder =
|
||||
new MaterialTimePicker.Builder()
|
||||
.setTitleText(title)
|
||||
.setTimeFormat(mIs24HourFormat ? TimeFormat.CLOCK_24H : TimeFormat.CLOCK_12H)
|
||||
.setInputMode(mInputMode)
|
||||
.setTheme(R.style.MwmTheme_MaterialTimePicker)
|
||||
.setHour((int) time.hours)
|
||||
.setMinute((int) time.minutes);
|
||||
|
||||
if (positiveButtonTextOverride != null)
|
||||
builder.setPositiveButtonText(positiveButtonTextOverride);
|
||||
|
||||
@@ -15,6 +15,7 @@ import java.util.Comparator;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Objects;
|
||||
import java.util.Set;
|
||||
|
||||
public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
@@ -40,7 +41,9 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
LocaleListCompat systemLocales = ConfigurationCompat.getLocales(config);
|
||||
|
||||
List<Language> languages = new ArrayList<>();
|
||||
List<Language> systemLanguages = new ArrayList<>();
|
||||
List<Language> systemLanguages = new ArrayList<>(systemLocales.size());
|
||||
for (int i = 0; i < systemLocales.size(); i++)
|
||||
systemLanguages.add(null);
|
||||
|
||||
for (Language lang : Editor.nativeGetSupportedLanguages(false))
|
||||
{
|
||||
@@ -49,7 +52,10 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
{
|
||||
Locale locale = systemLocales.get(i);
|
||||
if (locale != null && locale.getLanguage().equals(lang.code))
|
||||
systemLanguages.add(lang);
|
||||
{
|
||||
systemLanguages.add(i, lang);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (existingLanguages.contains(lang.code) || systemLanguages.contains(lang))
|
||||
@@ -60,7 +66,7 @@ public class LanguagesFragment extends BaseMwmRecyclerFragment<LanguagesAdapter>
|
||||
|
||||
Collections.sort(languages, Comparator.comparing(lhs -> lhs.name));
|
||||
|
||||
languages.addAll(0, systemLanguages);
|
||||
languages.addAll(0, systemLanguages.stream().filter(Objects::nonNull).toList());
|
||||
|
||||
return new LanguagesAdapter(this, languages.toArray(new Language[languages.size()]));
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@ import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ProgressBar;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.view.ViewCompat;
|
||||
@@ -23,6 +22,7 @@ import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.util.WindowInsetUtils;
|
||||
import app.organicmaps.widget.StackedButtonDialogFragment;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.progressindicator.CircularProgressIndicator;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
import java.text.NumberFormat;
|
||||
|
||||
@@ -50,7 +50,7 @@ public class ProfileFragment extends BaseMwmToolbarFragment
|
||||
private MaterialTextView mEditsSent;
|
||||
private MaterialTextView mProfileName;
|
||||
private ShapeableImageView mProfileImage;
|
||||
private ProgressBar mProfileInfoLoading;
|
||||
private CircularProgressIndicator mProfileInfoLoading;
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
|
||||
@@ -7,11 +7,9 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.IdRes;
|
||||
import androidx.annotation.IntRange;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
@@ -25,6 +23,7 @@ import app.organicmaps.sdk.util.Utils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.checkbox.MaterialCheckBox;
|
||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -122,20 +121,14 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
||||
notifyItemChanged(getItemCount() - 1);
|
||||
}
|
||||
|
||||
private void pickTime(int position,
|
||||
@IntRange(from = ID_OPENING_TIME, to = ID_CLOSED_SPAN) int id,
|
||||
private void pickTime(int position, @IntRange(from = ID_OPENING_TIME, to = ID_CLOSED_SPAN) int id,
|
||||
boolean startWithToTime)
|
||||
{
|
||||
final Timetable data = mItems.get(position);
|
||||
mPickingPosition = position;
|
||||
|
||||
FromToTimePicker.pickTime(mFragment,
|
||||
this,
|
||||
data.workingTimespan.start,
|
||||
data.workingTimespan.end,
|
||||
id,
|
||||
startWithToTime);
|
||||
|
||||
FromToTimePicker.pickTime(mFragment, this, data.workingTimespan.start, data.workingTimespan.end, id,
|
||||
startWithToTime);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -195,7 +188,7 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
||||
|
||||
SparseArray<MaterialCheckBox> days = new SparseArray<>(7);
|
||||
View allday;
|
||||
SwitchCompat swAllday;
|
||||
MaterialSwitch swAllday;
|
||||
View schedule;
|
||||
View openClose;
|
||||
View open;
|
||||
@@ -384,26 +377,21 @@ class SimpleTimetableAdapter extends RecyclerView.Adapter<SimpleTimetableAdapter
|
||||
final String text = mFragment.getString(R.string.editor_time_add);
|
||||
mAdd.setEnabled(enable);
|
||||
final ColorStateList bgButtonColor = new ColorStateList(
|
||||
new int[][]{
|
||||
new int[]{android.R.attr.state_enabled}, // enabled
|
||||
new int[]{-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[]{
|
||||
ContextCompat.getColor(
|
||||
mAdd.getContext(), R.color.base_accent),
|
||||
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_disabled)
|
||||
});
|
||||
new int[][] {
|
||||
new int[] {android.R.attr.state_enabled}, // enabled
|
||||
new int[] {-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[] {ContextCompat.getColor(mAdd.getContext(), R.color.base_accent),
|
||||
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_disabled)});
|
||||
final ColorStateList textButtonColor = new ColorStateList(
|
||||
new int[][]{
|
||||
new int[]{android.R.attr.state_enabled}, // enabled
|
||||
new int[]{-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[]{
|
||||
ContextCompat.getColor(
|
||||
mAdd.getContext(),
|
||||
UiUtils.getStyledResourceId(mAdd.getContext(), android.R.attr.textColorPrimaryInverse)),
|
||||
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_text_disabled)
|
||||
});
|
||||
new int[][] {
|
||||
new int[] {android.R.attr.state_enabled}, // enabled
|
||||
new int[] {-android.R.attr.state_enabled} // disabled
|
||||
},
|
||||
new int[] {
|
||||
ContextCompat.getColor(mAdd.getContext(), UiUtils.getStyledResourceId(
|
||||
mAdd.getContext(), android.R.attr.textColorPrimaryInverse)),
|
||||
ContextCompat.getColor(mAdd.getContext(), R.color.button_accent_text_disabled)});
|
||||
mAdd.setBackgroundTintList(bgButtonColor);
|
||||
mAdd.setTextColor(textButtonColor);
|
||||
mAdd.setText(enable ? text + " (" + TimeFormatUtils.formatWeekdays(mComplementItem) + ")" : text);
|
||||
|
||||
@@ -9,8 +9,8 @@ import androidx.annotation.Nullable;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.base.BaseMwmRecyclerFragment;
|
||||
|
||||
public class SimpleTimetableFragment extends BaseMwmRecyclerFragment<SimpleTimetableAdapter>
|
||||
implements TimetableProvider
|
||||
public class SimpleTimetableFragment
|
||||
extends BaseMwmRecyclerFragment<SimpleTimetableAdapter> implements TimetableProvider
|
||||
{
|
||||
private SimpleTimetableAdapter mAdapter;
|
||||
@Nullable
|
||||
|
||||
@@ -2,14 +2,12 @@ package app.organicmaps.maplayer;
|
||||
|
||||
import android.content.Context;
|
||||
import android.view.View;
|
||||
import androidx.annotation.AttrRes;
|
||||
import androidx.annotation.DrawableRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StringRes;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.adapter.OnItemClickListener;
|
||||
import app.organicmaps.sdk.maplayer.Mode;
|
||||
import app.organicmaps.util.ThemeUtils;
|
||||
|
||||
public class LayerBottomSheetItem
|
||||
{
|
||||
@@ -37,26 +35,29 @@ public class LayerBottomSheetItem
|
||||
@DrawableRes
|
||||
int drawableResId = 0;
|
||||
@StringRes
|
||||
int buttonTextResource = R.string.layers_title;
|
||||
switch (mode)
|
||||
int buttonTextResource = switch (mode)
|
||||
{
|
||||
case OUTDOORS:
|
||||
drawableResId = R.drawable.ic_layers_outdoors;
|
||||
buttonTextResource = R.string.button_layer_outdoor;
|
||||
break;
|
||||
case SUBWAY:
|
||||
drawableResId = R.drawable.ic_layers_subway;
|
||||
buttonTextResource = R.string.subway;
|
||||
break;
|
||||
case ISOLINES:
|
||||
drawableResId = R.drawable.ic_layers_isoline;
|
||||
buttonTextResource = R.string.button_layer_isolines;
|
||||
break;
|
||||
case TRAFFIC:
|
||||
drawableResId = R.drawable.ic_layers_traffic;
|
||||
buttonTextResource = R.string.button_layer_traffic;
|
||||
break;
|
||||
}
|
||||
case OUTDOORS ->
|
||||
{
|
||||
drawableResId = R.drawable.ic_layers_outdoors;
|
||||
yield R.string.button_layer_outdoor;
|
||||
}
|
||||
case SUBWAY ->
|
||||
{
|
||||
drawableResId = R.drawable.ic_layers_subway;
|
||||
yield R.string.subway;
|
||||
}
|
||||
case ISOLINES ->
|
||||
{
|
||||
drawableResId = R.drawable.ic_layers_isoline;
|
||||
yield R.string.button_layer_isolines;
|
||||
}
|
||||
case TRAFFIC ->
|
||||
{
|
||||
drawableResId = R.drawable.ic_layers_traffic;
|
||||
yield R.string.button_layer_traffic;
|
||||
}
|
||||
};
|
||||
return new LayerBottomSheetItem(drawableResId, buttonTextResource, mode, layerItemClickListener);
|
||||
}
|
||||
|
||||
|
||||
@@ -5,11 +5,9 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.adapter.OnItemClickListener;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
class LayerHolder extends RecyclerView.ViewHolder
|
||||
{
|
||||
|
||||
@@ -395,7 +395,7 @@ public class MapButtonsController extends Fragment
|
||||
0;
|
||||
// Allow offset tolerance for zoom buttons
|
||||
};
|
||||
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
|
||||
showButton(getViewTopOffset(translation, button) >= toleranceOffset, entry.getKey());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import app.organicmaps.widget.recycler.DotDividerItemDecoration;
|
||||
import app.organicmaps.widget.recycler.MultilineLayoutManager;
|
||||
|
||||
import com.google.android.material.button.MaterialButton;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
@@ -123,9 +122,9 @@ final class RoutingBottomMenuController implements View.OnClickListener
|
||||
@NonNull View timeElevationLine, @NonNull View transitFrame,
|
||||
@NonNull MaterialTextView error, @NonNull MaterialButton start,
|
||||
@NonNull ShapeableImageView altitudeChart, @NonNull MaterialTextView time,
|
||||
@NonNull MaterialTextView altitudeDifference, @NonNull MaterialTextView timeVehicle,
|
||||
@Nullable MaterialTextView arrival, @NonNull View actionFrame,
|
||||
@Nullable RoutingBottomMenuListener listener)
|
||||
@NonNull MaterialTextView altitudeDifference,
|
||||
@NonNull MaterialTextView timeVehicle, @Nullable MaterialTextView arrival,
|
||||
@NonNull View actionFrame, @Nullable RoutingBottomMenuListener listener)
|
||||
{
|
||||
mContext = context;
|
||||
mAltitudeChartFrame = altitudeChartFrame;
|
||||
|
||||
@@ -12,9 +12,6 @@ import androidx.annotation.IdRes;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.core.view.ViewCompat;
|
||||
import androidx.core.view.WindowInsetsCompat;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.MwmApplication;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.Framework;
|
||||
@@ -29,6 +26,7 @@ import app.organicmaps.util.WindowInsetUtils.PaddingInsetsListener;
|
||||
import app.organicmaps.widget.RoutingToolbarButton;
|
||||
import app.organicmaps.widget.ToolbarController;
|
||||
import app.organicmaps.widget.WheelProgressView;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
public class RoutingPlanController extends ToolbarController
|
||||
{
|
||||
@@ -264,7 +262,7 @@ public class RoutingPlanController extends ToolbarController
|
||||
default -> throw new IllegalArgumentException("unknown router: " + router);
|
||||
};
|
||||
|
||||
RoutingToolbarButton button = mRouterTypes.findViewById(mRouterTypes.getCheckedRadioButtonId());
|
||||
RoutingToolbarButton button = mRouterTypes.findViewById(mRouterTypes.getCheckedRadioButtonId());
|
||||
button.progress();
|
||||
|
||||
updateProgressLabels();
|
||||
|
||||
@@ -14,12 +14,10 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.search.DisplayedCategories;
|
||||
import app.organicmaps.sdk.util.Language;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.util.Locale;
|
||||
|
||||
@@ -5,10 +5,8 @@ import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StyleRes;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import app.organicmaps.base.BaseMwmFragmentActivity;
|
||||
import app.organicmaps.util.ThemeUtils;
|
||||
|
||||
public class SearchActivity extends BaseMwmFragmentActivity
|
||||
{
|
||||
|
||||
@@ -10,14 +10,12 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.content.ContextCompat;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.search.SearchResult;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.util.ThemeUtils;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHolder>
|
||||
{
|
||||
@@ -152,7 +150,8 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
||||
{
|
||||
final Resources resources = mSearchFragment.getResources();
|
||||
|
||||
if (result.description.openNow != SearchResult.OPEN_NOW_YES && result.description.openNow != SearchResult.OPEN_NOW_NO)
|
||||
if (result.description.openNow != SearchResult.OPEN_NOW_YES
|
||||
&& result.description.openNow != SearchResult.OPEN_NOW_NO)
|
||||
{
|
||||
// Hide if unknown opening hours state
|
||||
UiUtils.hide(mOpen);
|
||||
@@ -169,15 +168,18 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
||||
{
|
||||
final String minsToChangeStr = resources.getQuantityString(
|
||||
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
||||
final String nextChangeFormatted = resources.getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
||||
final String nextChangeFormatted =
|
||||
resources.getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
||||
|
||||
UiUtils.setTextAndShow(mOpen, nextChangeFormatted);
|
||||
mOpen.setTextColor(ContextCompat.getColor(mSearchFragment.getContext(), R.color.base_yellow));
|
||||
}
|
||||
else
|
||||
{
|
||||
UiUtils.setTextAndShow(mOpen, isOpen ? resources.getString(R.string.editor_time_open) : resources.getString(R.string.closed));
|
||||
mOpen.setTextColor(ContextCompat.getColor(mSearchFragment.getContext(), isOpen ? R.color.base_green : R.color.base_red));
|
||||
UiUtils.setTextAndShow(
|
||||
mOpen, isOpen ? resources.getString(R.string.editor_time_open) : resources.getString(R.string.closed));
|
||||
mOpen.setTextColor(
|
||||
ContextCompat.getColor(mSearchFragment.getContext(), isOpen ? R.color.base_green : R.color.base_red));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -273,7 +273,8 @@ public class SearchFragment extends BaseMwmFragment implements SearchListener, C
|
||||
RecyclerView mResults = mResultsFrame.findViewById(R.id.recycler);
|
||||
setRecyclerScrollListener(mResults);
|
||||
mResultsPlaceholder = mResultsFrame.findViewById(R.id.placeholder);
|
||||
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query, R.drawable.ic_search_fail);
|
||||
mResultsPlaceholder.setContent(R.string.search_not_found, R.string.search_not_found_query,
|
||||
R.drawable.ic_search_fail);
|
||||
mSearchAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver()
|
||||
|
||||
{
|
||||
|
||||
@@ -5,15 +5,13 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.MwmApplication;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.routing.RoutingController;
|
||||
import app.organicmaps.sdk.search.SearchRecents;
|
||||
import app.organicmaps.util.Graphics;
|
||||
import app.organicmaps.widget.SearchToolbarController;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
class SearchHistoryAdapter extends RecyclerView.Adapter<SearchHistoryAdapter.ViewHolder>
|
||||
{
|
||||
|
||||
@@ -8,12 +8,12 @@ import android.view.ViewGroup;
|
||||
import android.widget.CompoundButton;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.widget.SwitchCompat;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.base.BaseMwmToolbarFragment;
|
||||
import app.organicmaps.sdk.routing.RoutingController;
|
||||
import app.organicmaps.sdk.routing.RoutingOptions;
|
||||
import app.organicmaps.sdk.settings.RoadType;
|
||||
import com.google.android.material.materialswitch.MaterialSwitch;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
@@ -88,34 +88,34 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
||||
|
||||
private void initViews(@NonNull View root)
|
||||
{
|
||||
SwitchCompat tollsBtn = root.findViewById(R.id.avoid_tolls_btn);
|
||||
MaterialSwitch tollsBtn = root.findViewById(R.id.avoid_tolls_btn);
|
||||
tollsBtn.setChecked(RoutingOptions.hasOption(RoadType.Toll));
|
||||
CompoundButton.OnCheckedChangeListener tollBtnListener = new ToggleRoutingOptionListener(RoadType.Toll, root);
|
||||
tollsBtn.setOnCheckedChangeListener(tollBtnListener);
|
||||
|
||||
SwitchCompat motorwaysBtn = root.findViewById(R.id.avoid_motorways_btn);
|
||||
MaterialSwitch motorwaysBtn = root.findViewById(R.id.avoid_motorways_btn);
|
||||
motorwaysBtn.setChecked(RoutingOptions.hasOption(RoadType.Motorway));
|
||||
CompoundButton.OnCheckedChangeListener motorwayBtnListener =
|
||||
new ToggleRoutingOptionListener(RoadType.Motorway, root);
|
||||
motorwaysBtn.setOnCheckedChangeListener(motorwayBtnListener);
|
||||
|
||||
SwitchCompat ferriesBtn = root.findViewById(R.id.avoid_ferries_btn);
|
||||
MaterialSwitch ferriesBtn = root.findViewById(R.id.avoid_ferries_btn);
|
||||
ferriesBtn.setChecked(RoutingOptions.hasOption(RoadType.Ferry));
|
||||
CompoundButton.OnCheckedChangeListener ferryBtnListener = new ToggleRoutingOptionListener(RoadType.Ferry, root);
|
||||
ferriesBtn.setOnCheckedChangeListener(ferryBtnListener);
|
||||
|
||||
SwitchCompat dirtyRoadsBtn = root.findViewById(R.id.avoid_dirty_roads_btn);
|
||||
MaterialSwitch dirtyRoadsBtn = root.findViewById(R.id.avoid_dirty_roads_btn);
|
||||
dirtyRoadsBtn.setChecked(RoutingOptions.hasOption(RoadType.Dirty));
|
||||
dirtyRoadsBtn.setEnabled(!RoutingOptions.hasOption(RoadType.Paved) || RoutingOptions.hasOption(RoadType.Dirty));
|
||||
CompoundButton.OnCheckedChangeListener dirtyBtnListener = new ToggleRoutingOptionListener(RoadType.Dirty, root);
|
||||
dirtyRoadsBtn.setOnCheckedChangeListener(dirtyBtnListener);
|
||||
|
||||
SwitchCompat stepsBtn = root.findViewById(R.id.avoid_steps_btn);
|
||||
MaterialSwitch stepsBtn = root.findViewById(R.id.avoid_steps_btn);
|
||||
stepsBtn.setChecked(RoutingOptions.hasOption(RoadType.Steps));
|
||||
CompoundButton.OnCheckedChangeListener stepsBtnListener = new ToggleRoutingOptionListener(RoadType.Steps, root);
|
||||
stepsBtn.setOnCheckedChangeListener(stepsBtnListener);
|
||||
|
||||
SwitchCompat pavedBtn = root.findViewById(R.id.avoid_paved_roads_btn);
|
||||
MaterialSwitch 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);
|
||||
@@ -144,8 +144,8 @@ public class DrivingOptionsFragment extends BaseMwmToolbarFragment
|
||||
else
|
||||
RoutingOptions.removeOption(mRoadType);
|
||||
|
||||
SwitchCompat dirtyRoadsBtn = mRoot.findViewById(R.id.avoid_dirty_roads_btn);
|
||||
SwitchCompat pavedBtn = mRoot.findViewById(R.id.avoid_paved_roads_btn);
|
||||
MaterialSwitch dirtyRoadsBtn = mRoot.findViewById(R.id.avoid_dirty_roads_btn);
|
||||
MaterialSwitch pavedBtn = mRoot.findViewById(R.id.avoid_paved_roads_btn);
|
||||
if (mRoadType == RoadType.Dirty)
|
||||
{
|
||||
pavedBtn.setEnabled(!isChecked);
|
||||
|
||||
@@ -90,8 +90,7 @@ public enum ThemeSwitcher
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_YES);
|
||||
else
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);
|
||||
|
||||
if (RoutingController.get().isVehicleNavigation())
|
||||
style = MapStyle.VehicleDark;
|
||||
@@ -104,8 +103,7 @@ public enum ThemeSwitcher
|
||||
{
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S)
|
||||
uiModeManager.setApplicationNightMode(UiModeManager.MODE_NIGHT_NO);
|
||||
else
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);
|
||||
|
||||
if (RoutingController.get().isVehicleNavigation())
|
||||
style = MapStyle.VehicleClear;
|
||||
|
||||
@@ -8,165 +8,165 @@ import android.graphics.Typeface;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
public abstract class BaseSignView extends View
|
||||
{
|
||||
private float mBorderWidthRatio = 0.1f;
|
||||
protected void setBorderWidthRatio(float ratio) {
|
||||
mBorderWidthRatio = ratio;
|
||||
}
|
||||
private float mBorderWidthRatio = 0.1f;
|
||||
protected void setBorderWidthRatio(float ratio)
|
||||
{
|
||||
mBorderWidthRatio = ratio;
|
||||
}
|
||||
|
||||
private float mBorderInsetRatio = 0f;
|
||||
protected void setBorderInsetRatio(float ratio) {
|
||||
mBorderInsetRatio = ratio;
|
||||
}
|
||||
private float mBorderInsetRatio = 0f;
|
||||
protected void setBorderInsetRatio(float ratio)
|
||||
{
|
||||
mBorderInsetRatio = ratio;
|
||||
}
|
||||
|
||||
// colors
|
||||
protected int mBackgroundColor;
|
||||
protected int mBorderColor;
|
||||
protected int mAlertColor;
|
||||
protected int mTextColor;
|
||||
protected int mTextAlertColor;
|
||||
// colors
|
||||
protected int mBackgroundColor;
|
||||
protected int mBorderColor;
|
||||
protected int mAlertColor;
|
||||
protected int mTextColor;
|
||||
protected int mTextAlertColor;
|
||||
|
||||
// paints
|
||||
protected final Paint mBackgroundPaint;
|
||||
protected final Paint mBorderPaint;
|
||||
protected final Paint mTextPaint;
|
||||
// paints
|
||||
protected final Paint mBackgroundPaint;
|
||||
protected final Paint mBorderPaint;
|
||||
protected final Paint mTextPaint;
|
||||
|
||||
// geometry
|
||||
protected float mWidth;
|
||||
protected float mHeight;
|
||||
protected float mRadius;
|
||||
protected float mBorderWidth;
|
||||
protected float mBorderRadius;
|
||||
// geometry
|
||||
protected float mWidth;
|
||||
protected float mHeight;
|
||||
protected float mRadius;
|
||||
protected float mBorderWidth;
|
||||
protected float mBorderRadius;
|
||||
|
||||
public BaseSignView(Context ctx, @Nullable AttributeSet attrs)
|
||||
public BaseSignView(Context ctx, @Nullable AttributeSet attrs)
|
||||
{
|
||||
super(ctx, attrs);
|
||||
mBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mBorderPaint.setStyle(Paint.Style.STROKE);
|
||||
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||
mTextPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||
}
|
||||
|
||||
protected void setColors(int backgroundColor, int borderColor, int alertColor, int textColor, int textAlertColor)
|
||||
{
|
||||
mBackgroundColor = backgroundColor;
|
||||
mBorderColor = borderColor;
|
||||
mAlertColor = alertColor;
|
||||
mTextColor = textColor;
|
||||
mTextAlertColor = textAlertColor;
|
||||
|
||||
mBackgroundPaint.setColor(mBackgroundColor);
|
||||
mBorderPaint.setColor(mBorderColor);
|
||||
mTextPaint.setColor(mTextColor);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight)
|
||||
{
|
||||
super.onSizeChanged(width, height, oldWidth, oldHeight);
|
||||
final float paddingX = getPaddingLeft() + getPaddingRight();
|
||||
final float paddingY = getPaddingTop() + getPaddingBottom();
|
||||
mWidth = width - paddingX;
|
||||
mHeight = height - paddingY;
|
||||
mRadius = Math.min(mWidth, mHeight) / 2f;
|
||||
mBorderWidth = mRadius * mBorderWidthRatio;
|
||||
// subtract half the stroke PLUS the extra inset
|
||||
final float gap = mRadius * mBorderInsetRatio;
|
||||
mBorderRadius = mRadius - (mBorderWidth / 2f) - gap;
|
||||
configureTextSize();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(@NonNull Canvas canvas)
|
||||
{
|
||||
super.onDraw(canvas);
|
||||
final String str = getValueString();
|
||||
if (str == null)
|
||||
return;
|
||||
|
||||
final float cx = mWidth / 2f;
|
||||
final float cy = mHeight / 2f;
|
||||
|
||||
// background & border
|
||||
boolean alert = isAlert();
|
||||
mBackgroundPaint.setColor(alert ? mAlertColor : mBackgroundColor);
|
||||
canvas.drawCircle(cx, cy, mRadius, mBackgroundPaint);
|
||||
if (!alert)
|
||||
{
|
||||
super(ctx, attrs);
|
||||
mBackgroundPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mBorderPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mBorderPaint.setStyle(Paint.Style.STROKE);
|
||||
mTextPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
mTextPaint.setTextAlign(Paint.Align.CENTER);
|
||||
mTextPaint.setTypeface(Typeface.create(Typeface.DEFAULT, Typeface.BOLD));
|
||||
mBorderPaint.setStrokeWidth(mBorderWidth);
|
||||
mBorderPaint.setColor(mBorderColor);
|
||||
canvas.drawCircle(cx, cy, mBorderRadius, mBorderPaint);
|
||||
}
|
||||
|
||||
protected void setColors(int backgroundColor,
|
||||
int borderColor,
|
||||
int alertColor,
|
||||
int textColor,
|
||||
int textAlertColor)
|
||||
// text
|
||||
mTextPaint.setColor(alert ? mTextAlertColor : mTextColor);
|
||||
drawValueString(canvas, cx, cy, str);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(@NonNull MotionEvent e)
|
||||
{
|
||||
final float cx = mWidth / 2f, cy = mHeight / 2f;
|
||||
final float dx = e.getX() - cx, dy = e.getY() - cy;
|
||||
if ((dx * dx) + (dy * dy) <= (mRadius * mRadius))
|
||||
{
|
||||
mBackgroundColor = backgroundColor;
|
||||
mBorderColor = borderColor;
|
||||
mAlertColor = alertColor;
|
||||
mTextColor = textColor;
|
||||
mTextAlertColor = textAlertColor;
|
||||
|
||||
mBackgroundPaint.setColor(mBackgroundColor);
|
||||
mBorderPaint.setColor(mBorderColor);
|
||||
mTextPaint.setColor(mTextColor);
|
||||
performClick();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onSizeChanged(int width, int height, int oldWidth, int oldHeight) {
|
||||
super.onSizeChanged(width, height, oldWidth, oldHeight);
|
||||
final float paddingX = getPaddingLeft() + getPaddingRight();
|
||||
final float paddingY = getPaddingTop() + getPaddingBottom();
|
||||
mWidth = width - paddingX;
|
||||
mHeight = height - paddingY;
|
||||
mRadius = Math.min(mWidth, mHeight) / 2f;
|
||||
mBorderWidth = mRadius * mBorderWidthRatio;
|
||||
// subtract half the stroke PLUS the extra inset
|
||||
final float gap = mRadius * mBorderInsetRatio;
|
||||
mBorderRadius = mRadius - (mBorderWidth / 2f) - gap;
|
||||
configureTextSize();
|
||||
}
|
||||
@Override
|
||||
public boolean performClick()
|
||||
{
|
||||
super.performClick();
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDraw(@NonNull Canvas canvas)
|
||||
private void drawValueString(Canvas c, float cx, float cy, String str)
|
||||
{
|
||||
Rect b = new Rect();
|
||||
mTextPaint.getTextBounds(str, 0, str.length(), b);
|
||||
final float y = cy - b.exactCenterY();
|
||||
c.drawText(str, cx, y, mTextPaint);
|
||||
}
|
||||
|
||||
void configureTextSize()
|
||||
{
|
||||
String text = getValueString();
|
||||
if (text == null)
|
||||
return;
|
||||
final float textRadius = mBorderRadius - mBorderWidth;
|
||||
final float maxTextSize = 2f * textRadius;
|
||||
final float maxTextSize2 = maxTextSize * maxTextSize;
|
||||
float lo = 0f, hi = maxTextSize, sz = maxTextSize;
|
||||
Rect b = new Rect();
|
||||
while (lo <= hi)
|
||||
{
|
||||
super.onDraw(canvas);
|
||||
final String str = getValueString();
|
||||
if (str == null) return;
|
||||
|
||||
final float cx = mWidth / 2f;
|
||||
final float cy = mHeight / 2f;
|
||||
|
||||
// background & border
|
||||
boolean alert = isAlert();
|
||||
mBackgroundPaint.setColor(alert ? mAlertColor : mBackgroundColor);
|
||||
canvas.drawCircle(cx, cy, mRadius, mBackgroundPaint);
|
||||
if (!alert)
|
||||
{
|
||||
mBorderPaint.setStrokeWidth(mBorderWidth);
|
||||
mBorderPaint.setColor(mBorderColor);
|
||||
canvas.drawCircle(cx, cy, mBorderRadius, mBorderPaint);
|
||||
}
|
||||
|
||||
// text
|
||||
mTextPaint.setColor(alert ? mTextAlertColor : mTextColor);
|
||||
drawValueString(canvas, cx, cy, str);
|
||||
sz = (lo + hi) / 2f;
|
||||
mTextPaint.setTextSize(sz);
|
||||
mTextPaint.getTextBounds(text, 0, text.length(), b);
|
||||
float area = b.width() * b.width() + b.height() * b.height();
|
||||
if (area <= maxTextSize2)
|
||||
lo = sz + 1f;
|
||||
else
|
||||
hi = sz - 1f;
|
||||
}
|
||||
mTextPaint.setTextSize(Math.max(1f, sz));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(@NonNull MotionEvent e)
|
||||
{
|
||||
final float cx = mWidth / 2f, cy = mHeight / 2f;
|
||||
final float dx = e.getX() - cx, dy = e.getY() - cy;
|
||||
if ((dx * dx) + (dy * dy) <= (mRadius * mRadius))
|
||||
{
|
||||
performClick();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** child must return the string to draw, or null if nothing */
|
||||
@Nullable
|
||||
protected abstract String getValueString();
|
||||
|
||||
@Override
|
||||
public boolean performClick()
|
||||
{
|
||||
super.performClick();
|
||||
return false;
|
||||
}
|
||||
|
||||
private void drawValueString(Canvas c, float cx, float cy, String str)
|
||||
{
|
||||
Rect b = new Rect();
|
||||
mTextPaint.getTextBounds(str, 0, str.length(), b);
|
||||
final float y = cy - b.exactCenterY();
|
||||
c.drawText(str, cx, y, mTextPaint);
|
||||
}
|
||||
|
||||
void configureTextSize()
|
||||
{
|
||||
String text = getValueString();
|
||||
if (text == null) return;
|
||||
final float textRadius = mBorderRadius - mBorderWidth;
|
||||
final float maxTextSize = 2f * textRadius;
|
||||
final float maxTextSize2 = maxTextSize * maxTextSize;
|
||||
float lo = 0f, hi = maxTextSize, sz = maxTextSize;
|
||||
Rect b = new Rect();
|
||||
while (lo <= hi)
|
||||
{
|
||||
sz = (lo + hi) / 2f;
|
||||
mTextPaint.setTextSize(sz);
|
||||
mTextPaint.getTextBounds(text, 0, text.length(), b);
|
||||
float area = b.width()*b.width() + b.height()*b.height();
|
||||
if (area <= maxTextSize2)
|
||||
lo = sz + 1f;
|
||||
else
|
||||
hi = sz - 1f;
|
||||
}
|
||||
mTextPaint.setTextSize(Math.max(1f, sz));
|
||||
}
|
||||
|
||||
/** child must return the string to draw, or null if nothing */
|
||||
@Nullable
|
||||
protected abstract String getValueString();
|
||||
|
||||
/** child decides if this is in “alert” state */
|
||||
protected abstract boolean isAlert();
|
||||
/** child decides if this is in “alert” state */
|
||||
protected abstract boolean isAlert();
|
||||
}
|
||||
|
||||
@@ -4,9 +4,7 @@ import android.content.Context;
|
||||
import android.content.res.TypedArray;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Pair;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.util.StringUtils;
|
||||
|
||||
@@ -22,18 +20,18 @@ public class CurrentSpeedView extends BaseSignView
|
||||
setBorderWidthRatio(0.1f);
|
||||
setBorderInsetRatio(0.05f);
|
||||
|
||||
try (TypedArray a = ctx.getTheme()
|
||||
.obtainStyledAttributes(attrs, R.styleable.CurrentSpeedView /* reuse same attrs or define new */ , 0, 0))
|
||||
try (TypedArray a = ctx.getTheme().obtainStyledAttributes(
|
||||
attrs, R.styleable.CurrentSpeedView /* reuse same attrs or define new */, 0, 0))
|
||||
{
|
||||
int bg = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
||||
int bd = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBorderColor, DefaultValues.BORDER_COLOR);
|
||||
int tc = a.getColor(R.styleable.CurrentSpeedView_currentSpeedTextColor, DefaultValues.TEXT_COLOR);
|
||||
int bg = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
||||
int bd = a.getColor(R.styleable.CurrentSpeedView_currentSpeedBorderColor, DefaultValues.BORDER_COLOR);
|
||||
int tc = a.getColor(R.styleable.CurrentSpeedView_currentSpeedTextColor, DefaultValues.TEXT_COLOR);
|
||||
setColors(bg, bd, 0, tc, 0);
|
||||
|
||||
if (isInEditMode())
|
||||
{
|
||||
mSpeedMps = a.getInt(R.styleable.CurrentSpeedView_currentSpeedEditModeCurrentSpeed, 50);
|
||||
mSpeedStr = Integer.toString((int)mSpeedMps);
|
||||
mSpeedMps = a.getInt(R.styleable.CurrentSpeedView_currentSpeedEditModeCurrentSpeed, 50);
|
||||
mSpeedStr = Integer.toString((int) mSpeedMps);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,7 +45,7 @@ public class CurrentSpeedView extends BaseSignView
|
||||
}
|
||||
else
|
||||
{
|
||||
Pair<String,String> su = StringUtils.nativeFormatSpeedAndUnits(mps);
|
||||
Pair<String, String> su = StringUtils.nativeFormatSpeedAndUnits(mps);
|
||||
mSpeedStr = su.first;
|
||||
}
|
||||
requestLayout();
|
||||
@@ -70,8 +68,8 @@ public class CurrentSpeedView extends BaseSignView
|
||||
|
||||
private interface DefaultValues
|
||||
{
|
||||
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
||||
int BORDER_COLOR = 0xFF000000;
|
||||
int TEXT_COLOR = 0xFF000000;
|
||||
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
||||
int BORDER_COLOR = 0xFF000000;
|
||||
int TEXT_COLOR = 0xFF000000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package app.organicmaps.widget;
|
||||
import android.content.Context;
|
||||
import android.content.res.Resources;
|
||||
import android.content.res.TypedArray;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.util.AttributeSet;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
@@ -13,12 +12,10 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.annotation.StringRes;
|
||||
import androidx.core.content.ContextCompat;
|
||||
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
public class PlaceholderView extends LinearLayout
|
||||
{
|
||||
|
||||
@@ -7,7 +7,6 @@ import androidx.annotation.DrawableRes;
|
||||
import androidx.appcompat.content.res.AppCompatResources;
|
||||
import androidx.appcompat.widget.AppCompatRadioButton;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.util.ThemeUtils;
|
||||
|
||||
public class RoutingToolbarButton extends AppCompatRadioButton
|
||||
{
|
||||
|
||||
@@ -5,16 +5,14 @@ import android.content.res.TypedArray;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Paint;
|
||||
import android.util.AttributeSet;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import app.organicmaps.R;
|
||||
|
||||
public class SpeedLimitView extends BaseSignView
|
||||
{
|
||||
private int mSpeedLimit = -1;
|
||||
private boolean mAlert = false;
|
||||
private String mSpeedStr = "-1";
|
||||
private int mSpeedLimit = -1;
|
||||
private boolean mAlert = false;
|
||||
private String mSpeedStr = "-1";
|
||||
private final int unlimitedBorderColor;
|
||||
private final int unlimitedStripeColor;
|
||||
|
||||
@@ -27,15 +25,22 @@ public class SpeedLimitView extends BaseSignView
|
||||
|
||||
try (TypedArray styleAttrs = ctx.getTheme().obtainStyledAttributes(attrs, R.styleable.SpeedLimitView, 0, 0))
|
||||
{
|
||||
final int bgColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
||||
final int borderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBorderColor, DefaultValues.BORDER_COLOR);
|
||||
final int alertColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitAlertColor, DefaultValues.ALERT_COLOR);
|
||||
final int textColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextColor, DefaultValues.TEXT_COLOR);
|
||||
final int txtAlertColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextAlertColor, DefaultValues.TEXT_ALERT_COLOR);
|
||||
final int bgColor =
|
||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBackgroundColor, DefaultValues.BACKGROUND_COLOR);
|
||||
final int borderColor =
|
||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitBorderColor, DefaultValues.BORDER_COLOR);
|
||||
final int alertColor =
|
||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitAlertColor, DefaultValues.ALERT_COLOR);
|
||||
final int textColor =
|
||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextColor, DefaultValues.TEXT_COLOR);
|
||||
final int txtAlertColor =
|
||||
styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitTextAlertColor, DefaultValues.TEXT_ALERT_COLOR);
|
||||
setColors(bgColor, borderColor, alertColor, textColor, txtAlertColor);
|
||||
|
||||
unlimitedBorderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedBorderColor, DefaultValues.UNLIMITED_BORDER_COLOR);
|
||||
unlimitedStripeColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedStripeColor, DefaultValues.UNLIMITED_STRIPE_COLOR);
|
||||
unlimitedBorderColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedBorderColor,
|
||||
DefaultValues.UNLIMITED_BORDER_COLOR);
|
||||
unlimitedStripeColor = styleAttrs.getColor(R.styleable.SpeedLimitView_speedLimitUnlimitedStripeColor,
|
||||
DefaultValues.UNLIMITED_STRIPE_COLOR);
|
||||
|
||||
if (isInEditMode())
|
||||
{
|
||||
@@ -51,7 +56,7 @@ public class SpeedLimitView extends BaseSignView
|
||||
if (mSpeedLimit != limit)
|
||||
{
|
||||
mSpeedLimit = limit;
|
||||
mSpeedStr = Integer.toString(limit);
|
||||
mSpeedStr = Integer.toString(limit);
|
||||
requestLayout();
|
||||
}
|
||||
mAlert = alert;
|
||||
@@ -75,7 +80,7 @@ public class SpeedLimitView extends BaseSignView
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas)
|
||||
{
|
||||
final float cx = mWidth/2f, cy = mHeight/2f;
|
||||
final float cx = mWidth / 2f, cy = mHeight / 2f;
|
||||
|
||||
if (mSpeedLimit == 0) // 0 means unlimited speed (maxspeed=none)
|
||||
{
|
||||
@@ -105,7 +110,7 @@ public class SpeedLimitView extends BaseSignView
|
||||
stripe.setStrokeWidth(mBorderWidth * 0.4f);
|
||||
|
||||
final float radius = mRadius * 0.8f; // Shorten to 80% of full radius
|
||||
final float diag = (float) (1/Math.sqrt(2)); // 45 degrees
|
||||
final float diag = (float) (1 / Math.sqrt(2)); // 45 degrees
|
||||
final float dx = -diag, dy = +diag;
|
||||
final float px = -dy, py = +dx; // Perpendicular
|
||||
final float step = radius * 0.15f; // Spacing
|
||||
@@ -122,14 +127,13 @@ public class SpeedLimitView extends BaseSignView
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private interface DefaultValues
|
||||
{
|
||||
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
||||
int BORDER_COLOR = 0xFFFF0000;
|
||||
int ALERT_COLOR = 0xFFFF0000;
|
||||
int TEXT_COLOR = 0xFF000000;
|
||||
int TEXT_ALERT_COLOR = 0xFFFFFFFF;
|
||||
int BACKGROUND_COLOR = 0xFFFFFFFF;
|
||||
int BORDER_COLOR = 0xFFFF0000;
|
||||
int ALERT_COLOR = 0xFFFF0000;
|
||||
int TEXT_COLOR = 0xFF000000;
|
||||
int TEXT_ALERT_COLOR = 0xFFFFFFFF;
|
||||
int UNLIMITED_BORDER_COLOR = 0xFF000000;
|
||||
int UNLIMITED_STRIPE_COLOR = 0xFF000000;
|
||||
}
|
||||
|
||||
@@ -67,12 +67,12 @@ public class MyPositionButton
|
||||
{
|
||||
case LocationState.PENDING_POSITION -> R.drawable.ic_menu_location_pending;
|
||||
case LocationState.NOT_FOLLOW_NO_POSITION -> R.drawable.ic_location_off;
|
||||
case LocationState.NOT_FOLLOW -> R.drawable.ic_not_follow;
|
||||
case LocationState.NOT_FOLLOW -> R.drawable.ic_location_crosshair;
|
||||
case LocationState.FOLLOW -> R.drawable.ic_follow;
|
||||
case LocationState.FOLLOW_AND_ROTATE -> R.drawable.ic_follow_and_rotate;
|
||||
default -> throw new IllegalArgumentException("Invalid button mode: " + mode);
|
||||
};
|
||||
image = ResourcesCompat.getDrawable(resources, drawableRes, context.getTheme());
|
||||
image = ResourcesCompat.getDrawable(resources, drawableRes, context.getTheme());
|
||||
mIcons.put(mode, image);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
package app.organicmaps.widget.placepage;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import app.organicmaps.sdk.util.StringUtils;
|
||||
import com.github.mikephil.charting.charts.BarLineChartBase;
|
||||
import androidx.annotation.Nullable;
|
||||
import com.github.mikephil.charting.components.AxisBase;
|
||||
import com.github.mikephil.charting.formatter.IAxisValueFormatter;
|
||||
|
||||
|
||||
@@ -105,7 +105,8 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
|
||||
public EditBookmarkFragment() {}
|
||||
|
||||
@Override
|
||||
public void onCreate(@Nullable Bundle savedInstanceState) {
|
||||
public void onCreate(@Nullable Bundle savedInstanceState)
|
||||
{
|
||||
super.onCreate(savedInstanceState);
|
||||
setStyle(DialogFragment.STYLE_NORMAL, R.style.MwmTheme_FullScreenDialog);
|
||||
}
|
||||
@@ -184,10 +185,9 @@ public class EditBookmarkFragment extends BaseMwmDialogFragment implements View.
|
||||
{
|
||||
super.onStart();
|
||||
Dialog dialog = getDialog();
|
||||
if (dialog != null) {
|
||||
dialog.getWindow().setLayout(
|
||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
if (dialog != null)
|
||||
{
|
||||
dialog.getWindow().setLayout(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
|
||||
}
|
||||
|
||||
// Focus name and show keyboard for "Unknown Place" bookmarks
|
||||
|
||||
@@ -6,9 +6,6 @@ import android.widget.RelativeLayout;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.widget.NestedScrollView;
|
||||
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.ChartController;
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.Framework;
|
||||
@@ -17,6 +14,7 @@ import app.organicmaps.sdk.bookmarks.data.Track;
|
||||
import app.organicmaps.sdk.bookmarks.data.TrackStatistics;
|
||||
import app.organicmaps.util.UiUtils;
|
||||
import app.organicmaps.util.Utils;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
import java.util.Objects;
|
||||
|
||||
public class ElevationProfileViewRenderer implements PlacePageStateListener
|
||||
|
||||
@@ -14,7 +14,8 @@ public class OpenStateTextFormatter
|
||||
return String.format(Locale.ROOT, "%02d:%02d", hour, minute);
|
||||
|
||||
int h = hour % 12;
|
||||
if (h == 0) h = 12;
|
||||
if (h == 0)
|
||||
h = 12;
|
||||
String ampm = (hour < 12) ? "AM" : "PM";
|
||||
return String.format(Locale.ROOT, "%d:%02d %s", h, minute, ampm);
|
||||
}
|
||||
@@ -29,21 +30,13 @@ public class OpenStateTextFormatter
|
||||
return t.getDayOfWeek().getDisplayName(TextStyle.SHORT, locale);
|
||||
}
|
||||
|
||||
static String buildAtLabel(
|
||||
boolean opens,
|
||||
boolean isToday,
|
||||
String dayShort,
|
||||
String time,
|
||||
String opensAtLocalized,
|
||||
String closesAtLocalized,
|
||||
String opensDayAtLocalized,
|
||||
String closesDayAtLocalized
|
||||
)
|
||||
static String buildAtLabel(boolean opens, boolean isToday, String dayShort, String time, String opensAtLocalized,
|
||||
String closesAtLocalized, String opensDayAtLocalized, String closesDayAtLocalized)
|
||||
{
|
||||
if (isToday)
|
||||
return opens ? String.format(Locale.ROOT, opensAtLocalized, time) // Opens at %s
|
||||
: String.format(Locale.ROOT, closesAtLocalized, time); // Closes at %s
|
||||
: String.format(Locale.ROOT, closesAtLocalized, time); // Closes at %s
|
||||
return opens ? String.format(Locale.ROOT, opensDayAtLocalized, dayShort, time) // Opens %s at %s
|
||||
: String.format(Locale.ROOT, closesDayAtLocalized, dayShort, time); // Closes %s at %s
|
||||
: String.format(Locale.ROOT, closesDayAtLocalized, dayShort, time); // Closes %s at %s
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,6 +80,6 @@ public class PlacePageButtonFactory
|
||||
yield R.drawable.ic_more;
|
||||
}
|
||||
};
|
||||
return new PlacePageButton(titleId, iconId, buttonType);
|
||||
return new PlacePageButton(titleId, iconId, buttonType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,7 +55,6 @@ import app.organicmaps.sdk.downloader.MapManager;
|
||||
import app.organicmaps.sdk.editor.Editor;
|
||||
import app.organicmaps.sdk.editor.OhState;
|
||||
import app.organicmaps.sdk.editor.OpeningHours;
|
||||
import app.organicmaps.sdk.editor.data.HoursMinutes;
|
||||
import app.organicmaps.sdk.editor.data.Timetable;
|
||||
import app.organicmaps.sdk.location.LocationListener;
|
||||
import app.organicmaps.sdk.location.SensorListener;
|
||||
@@ -108,7 +107,6 @@ public class PlacePageView extends Fragment
|
||||
private static final String TRACK_SHARE_MENU_ID = "TRACK_SHARE_MENU_ID";
|
||||
|
||||
private static final int SHORT_HORIZON_CLOSE_MIN = 60;
|
||||
|
||||
private static final int SHORT_HORIZON_OPEN_MIN = 15;
|
||||
|
||||
private static final List<CoordinatesFormat> visibleCoordsFormat =
|
||||
@@ -155,6 +153,7 @@ public class PlacePageView extends Fragment
|
||||
private MaterialTextView mTvLastChecked;
|
||||
private View mEditPlace;
|
||||
private View mAddPlace;
|
||||
private View mMapTooOld;
|
||||
private View mEditTopSpace;
|
||||
private ShapeableImageView mColorIcon;
|
||||
private MaterialTextView mTvCategory;
|
||||
@@ -319,6 +318,7 @@ public class PlacePageView extends Fragment
|
||||
mTvLastChecked = mFrame.findViewById(R.id.place_page_last_checked);
|
||||
mEditPlace = mFrame.findViewById(R.id.ll__place_editor);
|
||||
mAddPlace = mFrame.findViewById(R.id.ll__place_add);
|
||||
mMapTooOld = mFrame.findViewById(R.id.cv__map_too_old);
|
||||
mEditTopSpace = mFrame.findViewById(R.id.edit_top_space);
|
||||
latlon.setOnLongClickListener(this);
|
||||
address.setOnLongClickListener(this);
|
||||
@@ -685,42 +685,72 @@ public class PlacePageView extends Fragment
|
||||
|
||||
if (RoutingController.get().isNavigating() || RoutingController.get().isPlanning())
|
||||
{
|
||||
UiUtils.hide(mEditPlace, mAddPlace, mEditTopSpace);
|
||||
UiUtils.hide(mEditPlace, mAddPlace, mEditTopSpace, mMapTooOld);
|
||||
}
|
||||
else
|
||||
{
|
||||
UiUtils.showIf(Editor.nativeShouldShowEditPlace(), mEditPlace);
|
||||
UiUtils.showIf(Editor.nativeShouldShowAddPlace(), mAddPlace);
|
||||
UiUtils.hide(mMapTooOld);
|
||||
MaterialButton mTvEditPlace = mEditPlace.findViewById(R.id.mb__place_editor);
|
||||
MaterialButton mTvAddPlace = mAddPlace.findViewById(R.id.mb__place_add);
|
||||
mTvEditPlace.setOnClickListener(this);
|
||||
mTvAddPlace.setOnClickListener(this);
|
||||
mTvEditPlace.setEnabled(Editor.nativeShouldEnableEditPlace());
|
||||
mTvAddPlace.setEnabled(Editor.nativeShouldEnableAddPlace());
|
||||
final int editTextButtonColor =
|
||||
Editor.nativeShouldEnableEditPlace()
|
||||
|
||||
boolean shouldEnableEditPlace = Editor.nativeShouldEnableEditPlace();
|
||||
|
||||
if (shouldEnableEditPlace)
|
||||
{
|
||||
mTvEditPlace.setOnClickListener(this);
|
||||
mTvAddPlace.setOnClickListener(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
mTvEditPlace.setOnClickListener(
|
||||
(v) -> { Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit); });
|
||||
mTvAddPlace.setOnClickListener(
|
||||
(v) -> { Utils.showSnackbar(v.getContext(), v.getRootView(), R.string.place_page_too_old_to_edit); });
|
||||
|
||||
String countryId = MapManager.nativeGetSelectedCountry();
|
||||
|
||||
if (countryId != null)
|
||||
{
|
||||
CountryItem map = CountryItem.fill(countryId);
|
||||
|
||||
if (map.status == CountryItem.STATUS_UPDATABLE || map.status == CountryItem.STATUS_DONE
|
||||
|| map.status == CountryItem.STATUS_FAILED)
|
||||
{
|
||||
UiUtils.show(mMapTooOld);
|
||||
|
||||
boolean canUpdateMap = map.status != CountryItem.STATUS_DONE;
|
||||
MaterialButton mTvUpdateTooOldMap = mMapTooOld.findViewById(R.id.mb__update_too_old_map);
|
||||
UiUtils.showIf(canUpdateMap, mTvUpdateTooOldMap);
|
||||
|
||||
MaterialTextView mapTooOldDescription = mMapTooOld.findViewById(R.id.tv__map_too_old_description);
|
||||
if (canUpdateMap)
|
||||
{
|
||||
mapTooOldDescription.setText(R.string.place_page_map_too_old_description);
|
||||
mTvUpdateTooOldMap.setOnClickListener((v) -> {
|
||||
MapManagerHelper.warn3gAndDownload(requireActivity(), map.id, null);
|
||||
UiUtils.hide(mMapTooOld);
|
||||
});
|
||||
}
|
||||
else
|
||||
mapTooOldDescription.setText(R.string.place_page_app_too_old_description);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
final int editButtonColor =
|
||||
shouldEnableEditPlace
|
||||
? ContextCompat.getColor(
|
||||
getContext(),
|
||||
UiUtils.getStyledResourceId(getContext(), com.google.android.material.R.attr.colorSecondary))
|
||||
: ContextCompat.getColor(getContext(), R.color.button_accent_text_disabled);
|
||||
final ColorStateList editStrokeButtonColor = new ColorStateList(
|
||||
new int[][]{
|
||||
new int[]{android.R.attr.state_enabled}, // enabled
|
||||
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.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace),
|
||||
mEditTopSpace);
|
||||
|
||||
mTvEditPlace.setTextColor(editButtonColor);
|
||||
mTvAddPlace.setTextColor(editButtonColor);
|
||||
mTvEditPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
||||
mTvAddPlace.setStrokeColor(ColorStateList.valueOf(editButtonColor));
|
||||
UiUtils.showIf(UiUtils.isVisible(mEditPlace) || UiUtils.isVisible(mAddPlace), mEditTopSpace);
|
||||
}
|
||||
updateLinksView();
|
||||
updateOpeningHoursView();
|
||||
@@ -821,25 +851,55 @@ public class PlacePageView extends Fragment
|
||||
}
|
||||
|
||||
// Get colours
|
||||
final ForegroundColorSpan colorGreen =
|
||||
new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_green));
|
||||
final ForegroundColorSpan colorGreen = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_green));
|
||||
final ForegroundColorSpan colorYellow =
|
||||
new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_yellow));
|
||||
new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_yellow));
|
||||
final ForegroundColorSpan colorRed = new ForegroundColorSpan(ContextCompat.getColor(context, R.color.base_red));
|
||||
|
||||
// Get next state info
|
||||
final SpannableStringBuilder openStateString = new SpannableStringBuilder();
|
||||
final boolean isOpen = (poiState.state == OhState.State.Open); // False == Closed due to early exit for Unknown
|
||||
final long nextStateTime = isOpen ? poiState.nextTimeClosed : poiState.nextTimeOpen; // Unix time (seconds)
|
||||
|
||||
ZonedDateTime nextChangeLocal = null;
|
||||
boolean hasFiniteNextChange = false;
|
||||
|
||||
final long nowSec = System.currentTimeMillis() / 1000;
|
||||
final int minsToNextState = (int) ((nextStateTime - nowSec) / 60);
|
||||
|
||||
// NOTE: Timezone is currently device timezone. TODO: use feature-specific timezone.
|
||||
final ZonedDateTime nextChangeLocal =
|
||||
ZonedDateTime.ofInstant(Instant.ofEpochSecond(nextStateTime), ZoneId.systemDefault());
|
||||
// Try to resolve a finite next-change time; handle 24/7 case
|
||||
final boolean looksLike247 = "24/7".equals(ohStr.trim());
|
||||
final int ONE_WEEK_MIN = 7 * 24 * 60;
|
||||
final boolean noRealNextChange = looksLike247 || minsToNextState >= ONE_WEEK_MIN;
|
||||
|
||||
if (!noRealNextChange)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (nextStateTime > 0 && nextStateTime < Long.MAX_VALUE / 2)
|
||||
{
|
||||
// NOTE: Timezone is currently device timezone. TODO: use feature-specific timezone.
|
||||
nextChangeLocal = ZonedDateTime.ofInstant(Instant.ofEpochSecond(nextStateTime), ZoneId.systemDefault());
|
||||
hasFiniteNextChange = true;
|
||||
}
|
||||
}
|
||||
catch (Throwable ignored)
|
||||
{}
|
||||
}
|
||||
|
||||
if (!hasFiniteNextChange) // No valid next change
|
||||
{
|
||||
if (isOpen)
|
||||
openStateString.append(getString(R.string.open_now), colorGreen, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
else
|
||||
openStateString.append(getString(R.string.closed_now), colorRed, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
UiUtils.setTextAndHideIfEmpty(mTvOpenState, openStateString);
|
||||
return;
|
||||
}
|
||||
|
||||
String localizedTimeString = OpenStateTextFormatter.formatHoursMinutes(
|
||||
nextChangeLocal.getHour(), nextChangeLocal.getMinute(), DateUtils.is24HourFormat(context));
|
||||
nextChangeLocal.getHour(), nextChangeLocal.getMinute(), DateUtils.is24HourFormat(context));
|
||||
|
||||
final boolean shortHorizonClosing = isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_CLOSE_MIN;
|
||||
final boolean shortHorizonOpening = !isOpen && minsToNextState >= 0 && minsToNextState <= SHORT_HORIZON_OPEN_MIN;
|
||||
@@ -847,12 +907,12 @@ public class PlacePageView extends Fragment
|
||||
if (shortHorizonClosing || shortHorizonOpening) // POI Opens/Closes in 60 mins • at 18:00
|
||||
{
|
||||
final String minsToChangeStr = getResources().getQuantityString(
|
||||
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
||||
R.plurals.minutes_short, Math.max(minsToNextState, 1), Math.max(minsToNextState, 1));
|
||||
final String nextChangeFormatted = getString(isOpen ? R.string.closes_in : R.string.opens_in, minsToChangeStr);
|
||||
|
||||
openStateString.append(nextChangeFormatted, colorYellow, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
|
||||
.append(" • ") // Add spacer
|
||||
.append(getString(R.string.at, localizedTimeString));
|
||||
.append(" • ") // Add spacer
|
||||
.append(getString(R.string.at, localizedTimeString));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -862,18 +922,16 @@ public class PlacePageView extends Fragment
|
||||
final String closesDayAtStr = getString(R.string.closes_day_at); // "Closes %1$s at %2$s"
|
||||
|
||||
final boolean isToday =
|
||||
OpenStateTextFormatter.isSameLocalDate(nextChangeLocal, ZonedDateTime.now(nextChangeLocal.getZone()));
|
||||
OpenStateTextFormatter.isSameLocalDate(nextChangeLocal, ZonedDateTime.now(nextChangeLocal.getZone()));
|
||||
// Full weekday name per design feedback.
|
||||
final String dayName =
|
||||
nextChangeLocal.getDayOfWeek().getDisplayName(TextStyle.FULL, Locale.getDefault());
|
||||
final String dayName = nextChangeLocal.getDayOfWeek().getDisplayName(TextStyle.FULL, Locale.getDefault());
|
||||
|
||||
if (isOpen) // > 60 minutes OR negative (safety). Show “Open now • Closes at 18:00”
|
||||
{
|
||||
openStateString.append(getString(R.string.open_now), colorGreen, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
final String atLabel =
|
||||
OpenStateTextFormatter.buildAtLabel(false, isToday, dayName, localizedTimeString,
|
||||
opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
||||
final String atLabel = OpenStateTextFormatter.buildAtLabel(
|
||||
false, isToday, dayName, localizedTimeString, opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
||||
|
||||
if (!TextUtils.isEmpty(atLabel))
|
||||
openStateString.append(" • ").append(atLabel);
|
||||
@@ -882,9 +940,8 @@ public class PlacePageView extends Fragment
|
||||
{
|
||||
openStateString.append(getString(R.string.closed_now), colorRed, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
|
||||
|
||||
final String atLabel =
|
||||
OpenStateTextFormatter.buildAtLabel(true, isToday, dayName, localizedTimeString,
|
||||
opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
||||
final String atLabel = OpenStateTextFormatter.buildAtLabel(
|
||||
true, isToday, dayName, localizedTimeString, opensAtStr, closesAtStr, opensDayAtStr, closesDayAtStr);
|
||||
|
||||
if (!TextUtils.isEmpty(atLabel))
|
||||
openStateString.append(" • ").append(atLabel);
|
||||
|
||||
@@ -3,9 +3,7 @@ package app.organicmaps.widget.placepage;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
import androidx.lifecycle.ViewModel;
|
||||
|
||||
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class PlacePageViewModel extends ViewModel
|
||||
|
||||
@@ -31,7 +31,8 @@ import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
public class PlacePageBookmarkFragment extends Fragment implements View.OnClickListener, View.OnLongClickListener,
|
||||
Observer<MapObject>, EditBookmarkFragment.EditBookmarkListener
|
||||
Observer<MapObject>,
|
||||
EditBookmarkFragment.EditBookmarkListener
|
||||
{
|
||||
private View mFrame;
|
||||
private MaterialTextView mTvBookmarkNote;
|
||||
|
||||
@@ -1,28 +1,25 @@
|
||||
package app.organicmaps.widget.placepage.sections;
|
||||
|
||||
import static android.view.View.INVISIBLE;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.GridLayout;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
import androidx.lifecycle.Observer;
|
||||
import androidx.lifecycle.ViewModelProvider;
|
||||
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
|
||||
import app.organicmaps.R;
|
||||
import app.organicmaps.sdk.Framework;
|
||||
import app.organicmaps.sdk.bookmarks.data.ChargeSocketDescriptor;
|
||||
import app.organicmaps.sdk.bookmarks.data.MapObject;
|
||||
import app.organicmaps.sdk.bookmarks.data.Metadata;
|
||||
import app.organicmaps.widget.placepage.PlacePageViewModel;
|
||||
import com.google.android.material.imageview.ShapeableImageView;
|
||||
import com.google.android.material.textview.MaterialTextView;
|
||||
import java.text.DecimalFormat;
|
||||
|
||||
public class PlacePageChargeSocketsFragment extends Fragment implements Observer<MapObject>
|
||||
@@ -89,7 +86,7 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
|
||||
|
||||
// load SVG icon converted into VectorDrawable in res/drawable
|
||||
@SuppressLint("DiscouragedApi")
|
||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.type(), "drawable",
|
||||
int resIconId = getResources().getIdentifier("ic_charge_socket_" + socket.visualType(), "drawable",
|
||||
requireContext().getPackageName());
|
||||
if (resIconId != 0)
|
||||
{
|
||||
@@ -97,8 +94,8 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
|
||||
}
|
||||
|
||||
@SuppressLint("DiscouragedApi")
|
||||
int resTypeId =
|
||||
getResources().getIdentifier("charge_socket_" + socket.type(), "string", requireContext().getPackageName());
|
||||
int resTypeId = getResources().getIdentifier("charge_socket_" + socket.visualType(), "string",
|
||||
requireContext().getPackageName());
|
||||
if (resTypeId != 0)
|
||||
{
|
||||
type.setText(resTypeId);
|
||||
@@ -109,6 +106,10 @@ public class PlacePageChargeSocketsFragment extends Fragment implements Observer
|
||||
DecimalFormat df = new DecimalFormat("#.##");
|
||||
power.setText(getString(R.string.kw_label, df.format(socket.power())));
|
||||
}
|
||||
else if (socket.ignorePower())
|
||||
{
|
||||
power.setVisibility(INVISIBLE);
|
||||
}
|
||||
|
||||
if (socket.count() != 0)
|
||||
{
|
||||
|
||||
@@ -191,8 +191,9 @@ public class PlacePageLinksFragment extends Fragment implements Observer<MapObje
|
||||
case FMD_PANORAMAX -> null; // Don't add raw ID to list, as it's useless for users.
|
||||
default -> mMapObject.getMetadata(type);
|
||||
};
|
||||
// Add user names for social media if available
|
||||
if (!TextUtils.isEmpty(title) && !title.equals(url) && !title.contains("/")) items.add(title);
|
||||
// Add user names for social media if available
|
||||
if (!TextUtils.isEmpty(title) && !title.equals(url) && !title.contains("/"))
|
||||
items.add(title);
|
||||
|
||||
if (items.size() == 1)
|
||||
PlacePageUtils.copyToClipboard(requireContext(), mFrame, items.get(0));
|
||||
|
||||
20
android/app/src/main/res/color/m3_dark_highlighted_text.xml
Normal file
20
android/app/src/main/res/color/m3_dark_highlighted_text.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2021 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<!-- Material3 alternative to textColorHighlight for dark theme -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="@dimen/material_emphasis_medium" android:color="@color/m3_sys_color_dark_primary" />
|
||||
</selector>
|
||||
20
android/app/src/main/res/color/m3_highlighted_text.xml
Normal file
20
android/app/src/main/res/color/m3_highlighted_text.xml
Normal file
@@ -0,0 +1,20 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
~ Copyright (C) 2021 The Android Open Source Project
|
||||
~
|
||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
~ you may not use this file except in compliance with the License.
|
||||
~ You may obtain a copy of the License at
|
||||
~
|
||||
~ http://www.apache.org/licenses/LICENSE-2.0
|
||||
~
|
||||
~ Unless required by applicable law or agreed to in writing, software
|
||||
~ distributed under the License is distributed on an "AS IS" BASIS,
|
||||
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
~ See the License for the specific language governing permissions and
|
||||
~ limitations under the License.
|
||||
-->
|
||||
<!-- Material3 alternative to textColorHighlight for light theme -->
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:alpha="@dimen/material_emphasis_medium" android:color="?attr/colorOnPrimaryContainer" />
|
||||
</selector>
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#717065" />
|
||||
<solid android:color="#51585E" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M20,8 C20.82725,8 21.5,8.67275 21.5,9.5 L21.5,18.5 C21.5,19.32725 20.82725,20 20,20 L8,20 C7.17275,20 6.5,19.32725 6.5,18.5 L6.5,9.5 C6.5,8.67275 7.17275,8 8,8 L20,8 Z M20.00075,14 L8,14 L8,18.5 L20.0015,18.5 L20.00075,14 Z M14,15.5 L14,17 L9.5,17 L9.5,15.5 L14,15.5 Z M20,9.5 L8,9.5 L8,11 L20,11 L20,9.5 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#717065" />
|
||||
<solid android:color="#51585E" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M7,9.53073333 L14,6.3 L21,9.53073333 L21,10.60766 L19.9230733,10.60766 L19.9230733,18.68461 L21,18.68461 L21,20.2999767 L7,20.2999767 L7,18.68461 L8.07692667,18.68461 L8.07692667,10.60766 L7,10.60766 L7,9.53073333 Z M16.6923167,15.2756333 C16.6923167,14.0852833 15.4814333,13.1208 13.9976667,13.1208 C13.50468,13.1208 13.09784,12.7993017 13.09784,12.4012583 C13.09784,12.003215 13.4998967,11.6817167 13.9976667,11.6817167 C14.4954483,11.6817167 14.8974933,12.0070417 14.8974933,12.4012583 L16.69241,12.4012583 C16.69241,11.4673883 15.94096,10.6789083 14.8974933,10.3803583 L14.8974933,9.53068667 L13.1025767,9.53068667 L13.1025767,10.3803583 C12.0591567,10.6788967 11.30766,11.46733 11.30766,12.4012583 C11.30766,13.5916083 12.5185433,14.5560917 14.00231,14.5560917 C14.5000917,14.5560917 14.9021367,14.87759 14.9021367,15.2756333 C14.9021367,15.6736767 14.50008,15.995175 14.00231,15.995175 C13.5045283,15.995175 13.1024833,15.66985 13.1024833,15.2756333 L11.3075667,15.2756333 C11.3075667,16.2095033 12.0590167,16.9979833 13.1024833,17.2965333 L13.1024833,18.146205 L14.8974,18.146205 L14.8974,17.2965333 C15.94082,16.997995 16.6923167,16.2095617 16.6923167,15.2756333 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#7F5933" />
|
||||
<solid android:color="#802D19" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -18,7 +18,7 @@
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:pathData="M10.7398398,14.5988166 C11.2766539,14.5988166 11.7741396,14.7668787 12.1823664,15.0532612 C11.7724801,15.4914625 11.5235582,16.0775925 11.5235582,16.7240712 L11.529303,16.8892426 L11.5491056,17.0705775 C11.6012609,17.429281 11.7280184,17.7632492 11.9167798,18.0556079 L11.9546499,18.1104694 L11.9142567,18.13405 C11.1417478,18.5947243 10.6376499,19.4380664 10.6376499,20.3887564 L10.637,21.073 L5.952,21.073 L5.95232411,17.1079171 C5.95232411,15.7221656 7.06098553,14.5988166 8.46443574,14.5988166 L10.7398398,14.5988166 Z M14.7363802,18.7647355 C15.6343829,18.7647355 16.3623501,19.4913492 16.3623501,20.3887564 L16.362,21.073 L11.637,21.073 L11.6376499,20.3887564 C11.6376499,19.4918257 12.3552335,18.7647355 13.2636198,18.7647355 L14.7363802,18.7647355 Z M19.4916069,12.4068343 C20.8792516,12.4068343 22.0041478,13.5296391 22.0041478,14.9163636 L22.004,21.073 L17.362,21.073 L17.3623501,20.3887564 L17.3567032,20.2194334 L17.3385166,20.043376 C17.2273964,19.2299207 16.7526866,18.5346787 16.0784713,18.1328785 L16.0416499,18.1124694 L16.0806774,18.0575117 C16.336328,17.665886 16.4764418,17.2070581 16.4764418,16.7240712 C16.4764418,15.6254025 15.757471,14.7010059 14.7609634,14.3838791 C15.0006762,13.2537372 15.9971232,12.4068343 17.215814,12.4068343 L19.4916069,12.4068343 Z M14,15.2664694 C14.8194057,15.2664694 15.4764418,15.9151249 15.4764418,16.7240712 C15.4764418,17.5330608 14.819449,18.1816731 14,18.1816731 C13.1805943,18.1816731 12.5235582,17.5330175 12.5235582,16.7240712 C12.5235582,15.9150816 13.1805943,15.2664694 14,15.2664694 Z M9.60213775,9.19402109 C10.8681135,9.19402109 11.8832295,10.1961892 11.8832295,11.4460053 C11.8832295,12.6958883 10.8681805,13.6979895 9.60213775,13.6979895 C8.33616197,13.6979895 7.32104605,12.6958214 7.32104605,11.4460053 C7.32104605,10.1961223 8.33616197,9.19402109 9.60213775,9.19402109 Z M18.3537105,7.00111521 C19.6199026,7.00111521 20.635192,8.00345456 20.635192,9.25348422 C20.635192,10.5035808 19.6199695,11.5058532 18.3537105,11.5058532 C17.0875184,11.5058532 16.072229,10.5035139 16.072229,9.25348422 C16.072229,8.00338763 17.0875184,7.00111521 18.3537105,7.00111521 Z"
|
||||
android:fillColor="#FFF" />
|
||||
android:fillColor="#000" />
|
||||
</group>
|
||||
</vector>
|
||||
</item>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#BB9342" />
|
||||
<solid android:color="#8C491C" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -18,7 +18,7 @@
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:pathData="M12.5416667,11.1416783 L12.5416667,7.70257833 C12.5416667,7.31455667 12.232395,7 11.8466717,7 L11.7783342,7 C11.3945008,7 11.0833392,7.32498667 11.0833392,7.70257833 L11.0833392,11.1416783 L9.62500583,11.1416783 L9.62500583,7.70257833 C9.62500583,7.31455667 9.31573417,7 8.93001083,7 L8.86167333,7 C8.47784,7 8.16667833,7.32498667 8.16667833,7.70257833 L8.16667833,11.1416783 C8.16667833,12.749345 9.62501167,14.0000117 11.0104283,14.0000117 L10.8211833,20.055945 C10.8048897,20.5773283 11.2048417,21 11.7169383,21 L11.9080967,21 C12.4190967,21 12.815985,20.58308 12.7940167,20.055945 L12.54169,14.0000117 C14.0000233,14.0000117 15.7500233,12.749345 15.4583567,11.1416783 L15.4583567,7.70257833 C15.4583567,7.31455667 15.149085,7 14.7633617,7 L14.6950242,7 C14.3111908,7 14.0000292,7.32498667 14.0000292,7.70257833 L14.0000292,11.1416783 L12.5416958,11.1416783 L12.5416667,11.1416783 Z M16.3333333,14.933345 L18.0833333,14.933345 L18.0833333,20.130845 C18.0833333,20.6108933 18.4717167,21.0000467 18.9583333,21.0000467 C19.4415783,21.0000467 19.8333333,20.6109983 19.8333333,20.1242883 L19.8333333,7.000455 C17.3903333,7.000455 16.275,8.69912167 16.3333333,10.0337883 L16.3333333,14.9337883 L16.3333333,14.933345 Z"
|
||||
android:fillColor="#FFF" />
|
||||
android:fillColor="#000" />
|
||||
</group>
|
||||
</vector>
|
||||
</item>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#7F5933" />
|
||||
<solid android:color="#802D19" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -18,7 +18,7 @@
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:pathData="M14.8166667,12.2166667 L14.8166667,17.525 C14.8166667,20.0076667 12.8076667,22.0166667 10.325,22.0166667 C7.84233333,22.0166667 5.83333333,20.0076667 5.83333333,17.525 L5.83333333,12.2166667 L14.8166667,12.2166667 Z M12.3666667,17.9333333 L8.28333333,17.9333333 C8.28333333,18.6111667 9.198,19.1583333 10.325,19.1583333 C11.452,19.1583333 12.3666667,18.6111667 12.3666667,17.9333333 Z M22.1666667,6.5 L22.1666667,11.8083333 C22.1666667,14.291 20.1576667,16.3 17.675,16.3 C16.94,16.3 16.2458333,16.1121667 15.6333333,15.8018333 L15.6333333,11.4 L13.1833333,11.4 L13.1833333,6.5 L22.1666667,6.5 Z M12.3666667,14.6666667 C11.9175,14.6666667 11.55,15.0341667 11.55,15.4833333 C11.55,15.9325 11.9175,16.3 12.3666667,16.3 C12.8158333,16.3 13.1833333,15.9325 13.1833333,15.4833333 C13.1833333,15.0341667 12.8158333,14.6666667 12.3666667,14.6666667 Z M8.28333333,14.6666667 C7.83416667,14.6666667 7.46666667,15.0341667 7.46666667,15.4833333 C7.46666667,15.9325 7.83416667,16.3 8.28333333,16.3 C8.7325,16.3 9.1,15.9325 9.1,15.4833333 C9.1,15.0341667 8.7325,14.6666667 8.28333333,14.6666667 Z M17.675,12.2166667 C16.548,12.2166667 15.6333333,12.7638333 15.6333333,13.4416667 L19.7166667,13.4416667 C19.7166667,12.7638333 18.802,12.2166667 17.675,12.2166667 Z M15.6333333,9.01533333 C15.1841667,9.01533333 14.8166667,9.38283333 14.8166667,9.832 C14.8166667,10.2811667 15.1841667,10.6486667 15.6333333,10.6486667 C16.0825,10.6486667 16.45,10.2893333 16.45,9.832 C16.45,9.38283333 16.0825,9.01533333 15.6333333,9.01533333 Z M19.7166667,9.01533333 C19.2675,9.01533333 18.9,9.38283333 18.9,9.832 C18.9,10.2811667 19.2675,10.6486667 19.7166667,10.6486667 C20.1658333,10.6486667 20.5333333,10.2893333 20.5333333,9.832 C20.5333333,9.38283333 20.1658333,9.01533333 19.7166667,9.01533333 Z"
|
||||
android:fillColor="#FFF" />
|
||||
android:fillColor="#000" />
|
||||
</group>
|
||||
</vector>
|
||||
</item>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#8C5F93" />
|
||||
<solid android:color="#6B425C" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M11.3735667,18.307716 C10.6313217,18.307716 10.0307333,18.9134843 10.0307333,19.653816 C10.0307333,20.394206 10.631275,20.999916 11.3735667,20.999916 C12.1158117,20.999916 12.72305,20.3941477 12.72305,19.653816 C12.72305,18.913426 12.115765,18.307716 11.3735667,18.307716 Z M6.8,7.48804933 C6.8,7.813281 7.06993167,8.07692433 7.38562,8.07692433 L8.2,8.07692433 L10.3,14.5385077 C9.55654167,14.5385077 8.9539,15.3205827 8.9539,16.286291 L8.9539,16.0215277 C8.9539,16.9867927 9.739055,17.769311 10.7023833,17.769311 L18.8085,17.769311 C19.1352133,17.769311 19.4000583,17.5195393 19.4000583,17.180436 L19.4000583,17.2812663 C19.4000583,16.9560347 19.129765,16.6923913 18.8139717,16.6923913 L10.6169717,16.6923913 C10.29328,16.6923913 10.030885,16.4426197 10.030885,16.1035163 L10.030885,16.2043467 C10.030885,15.879115 10.2980983,15.6154717 10.6084667,15.6154717 L18.0620667,15.6154717 C19.2169033,15.6154717 19.113315,15.3197567 19.2870667,14.969325 L20.7161167,10.1360583 C20.7721167,10.0380583 20.8001167,9.91905833 20.8001167,9.80005833 C20.8001167,9.41505833 20.4851167,9.10005833 20.2616533,9.1539 L9.74707,9.1539 L8.90007,7 L7.37395333,7 C7.05702833,7 6.8,7.24977167 6.8,7.588875 L6.8,7.48804467 L6.8,7.48804933 Z M17.8350333,18.307716 C17.0927883,18.307716 16.4922,18.9134843 16.4922,19.653816 C16.4922,20.394206 17.0927417,20.999916 17.8350333,20.999916 C18.577325,20.999916 19.1845167,20.3941477 19.1845167,19.653816 C19.1845167,18.913426 18.5772317,18.307716 17.8350333,18.307716 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#717065" />
|
||||
<solid android:color="#574469" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M17.846514,4.676 C17.5575662,4.7216586 17.3186367,4.92551065 17.2280519,5.20366514 C17.1374671,5.48181964 17.2105329,5.78727723 17.4171807,5.99433333 L19.428514,8.00566667 C19.799514,8.37666667 20.062014,8.83516667 20.1973474,9.33333333 L19.523014,9.33333333 C18.2431807,9.33333333 17.1896807,10.3868333 17.1896807,11.6666667 C17.1896807,12.9465 18.2431807,14 19.523014,14 L20.300007,14 L20.300007,19.4448333 C20.300007,19.8835 19.9616807,20.2218333 19.523014,20.2218333 C19.315878,20.2250062 19.1162779,20.1442015 18.9696836,19.997827 C18.8230893,19.8514525 18.7419852,19.6519738 18.7448474,19.4448333 L18.7448474,17.8885 C18.7448474,16.6098333 17.6913474,15.5551667 16.411514,15.5551667 L15.6333474,15.5551667 L15.6333474,7.77816667 C15.6345903,7.36522389 15.4711795,6.96881891 15.1792931,6.67671349 C14.8874066,6.38460807 14.4911243,6.22090001 14.0781807,6.22183333 L7.85634735,6.22183333 C7.44320185,6.22058891 7.04661893,6.38415963 6.75447962,6.67629894 C6.46234031,6.96843825 6.2987696,7.36502117 6.30000697,7.77816667 L6.30000697,20.2218333 C6.2987696,20.6349788 6.46234031,21.0315618 6.75447962,21.3237011 C7.04661893,21.6158404 7.44320185,21.7794111 7.85634735,21.7781737 L14.0781807,21.7781737 C14.4911243,21.7791 14.8874066,21.6153919 15.1792931,21.3232865 C15.4711795,21.0311811 15.6345903,20.6347761 15.6333474,20.2218333 L15.6333474,17.1115 L16.411514,17.1115 C16.8501807,17.1115 17.1896807,17.4498333 17.1896807,17.8885 L17.1896807,19.4448333 C17.1896807,20.7235 18.2431807,21.7781737 19.523014,21.7781737 C20.8016807,21.7781737 21.8563474,20.7235 21.8563474,19.4448333 L21.8563474,10.1115 C21.8563474,8.90940677 21.3788136,7.75655029 20.5286807,6.90666667 L18.5173474,4.89416667 C18.3411731,4.71808596 18.0913541,4.63698153 17.8453474,4.676 L17.846514,4.676 Z M8.63218069,7.77816667 L13.2988474,7.77816667 C13.730514,7.77816667 14.077014,8.12466667 14.077014,8.55516667 L14.077014,12.4448333 L7.85634735,12.4448333 L7.85634735,8.55516667 C7.85634735,8.12466667 8.20284735,7.77816667 8.63334735,7.77816667 L8.63218069,7.77816667 Z M19.523014,10.5 C20.1673462,10.5 20.6896807,11.0223345 20.6896807,11.6666667 C20.6896807,12.3109989 20.1673462,12.8333333 19.523014,12.8333333 C18.8786818,12.8333333 18.3563474,12.3109989 18.3563474,11.6666667 C18.3563474,11.0223345 18.8786818,10.5 19.523014,10.5 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#C15746" />
|
||||
<solid android:color="#983E44" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M21.1291111,17.1111111 L17.1106444,17.1111111 L17.1106444,21.1295778 C17.1106444,21.9138422 16.4689778,22.5555089 15.6847133,22.5555089 L12.3142911,22.5555089 C11.5300267,22.5555089 10.88836,21.9138422 10.88836,21.1295778 L10.88836,17.1111111 L6.86973778,17.1111111 C6.08547333,17.1111111 5.44383778,16.4694444 5.44383778,15.68518 L5.44383778,12.3147578 C5.44383778,11.5304933 6.08550444,10.8888267 6.86973778,10.8888267 L10.88836,10.8888267 L10.88836,6.87036 C10.88836,6.08609556 11.5300267,5.44442889 12.3142911,5.44442889 L15.6847133,5.44442889 C16.4689778,5.44442889 17.1106444,6.08609556 17.1106444,6.87036 L17.1106444,10.8888267 L21.1291111,10.8888267 C21.9133756,10.8888267 22.5550422,11.5304933 22.5550422,12.3147578 L22.5550422,15.68518 C22.5550422,16.4694444 21.9133756,17.1111111 21.1291111,17.1111111 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#664E42" />
|
||||
<solid android:color="#614A43" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M10.2879,14.1061667 C11.5203667,14.1061667 12.5151833,13.111315 12.5151833,11.8788833 C12.5151833,10.6464167 11.5203317,9.6516 10.2879,9.6516 C9.05543333,9.6516 8.06061667,10.6464517 8.06061667,11.8788833 C8.06061667,13.11135 9.05546833,14.1061667 10.2879,14.1061667 Z M19.1970333,9.6516 L14.7424667,9.6516 C13.9258,9.6516 13.25765,10.319785 13.25765,11.1364167 L13.25765,14.8485167 L7.31826667,14.8485167 L7.31826667,8.90913333 C7.31826667,8.5008 6.98418,8.16671333 6.57584667,8.16671333 C6.16751333,8.16671333 5.83342667,8.5008 5.83342667,8.90913333 L5.83342667,18.5606167 C5.83342667,18.96895 6.16751333,19.3030367 6.57584667,19.3030367 C6.98418,19.3030367 7.31826667,18.96895 7.31826667,18.5606167 L7.31826667,17.0758 L20.6824333,17.0758 L20.6824333,18.5606167 C20.6824333,18.96895 21.01652,19.3030367 21.4248533,19.3030367 C21.8331867,19.3030367 22.1672733,18.96895 22.1672733,18.5606167 L22.1672733,12.6212333 C22.1672733,10.9804333 20.8383233,9.65148333 19.1975233,9.65148333 L19.1970333,9.6516 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
android:scaleX="0.5"
|
||||
android:scaleY="0.5">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M8.5714,5.1429l6.8571,0l0,-1.7143l-6.8571,0ZM24,13.7143l0,6.4286c0,0.5893 -0.2098,1.0938 -0.6295,1.5134 -0.4196,0.4196 -0.9241,0.6295 -1.5134,0.6295l-19.7143,0c-0.5893,0 -1.0938,-0.2098 -1.5134,-0.6295 -0.4196,-0.4196 -0.6295,-0.9241 -0.6295,-1.5134l0,-6.4286l9,0l0,2.1429c0,0.2321 0.0848,0.433 0.2545,0.6027 0.1696,0.1696 0.3705,0.2545 0.6027,0.2545l4.2857,0c0.2321,0 0.433,-0.0848 0.6027,-0.2545 0.1696,-0.1696 0.2545,-0.3705 0.2545,-0.6027l0,-2.1429ZM13.7143,13.7143l0,1.7143l-3.4286,0l0,-1.7143ZM24,7.2857l0,5.1429l-24,0l0,-5.1429c0,-0.5893 0.2098,-1.0938 0.6295,-1.5134 0.4196,-0.4196 0.9241,-0.6295 1.5134,-0.6295l4.7143,0l0,-2.1429c0,-0.3571 0.125,-0.6607 0.375,-0.9107 0.25,-0.25 0.5536,-0.375 0.9107,-0.375l7.7143,0c0.3571,0 0.6607,0.125 0.9107,0.375 0.25,0.25 0.375,0.5536 0.375,0.9107l0,2.1429l4.7143,0c0.5893,0 1.0938,0.2098 1.5134,0.6295 0.4196,0.4196 0.6295,0.9241 0.6295,1.5134Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#BB9342" />
|
||||
<solid android:color="#8C491C" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M21,8.42778167 C21,7.80556333 20.4944483,7.3 19.8722183,7.3 L8.127385,7.3 C7.50516667,7.3 6.99960333,7.80555167 6.99960333,8.42778167 C6.99960333,8.7 7.10071483,8.97223 7.287385,9.17444833 L13.2218683,15.8555983 L13.2218683,19.7444483 L10.1107183,19.7444483 C9.68293667,19.7444483 9.33293667,20.0944483 9.33293667,20.52223 C9.33293667,20.9500117 9.68293667,21.3000117 10.1107183,21.3000117 L17.888535,21.3000117 C18.3163167,21.3000117 18.6663167,20.9500117 18.6663167,20.52223 C18.6663167,20.0944483 18.3163167,19.7444483 17.888535,19.7444483 L14.777385,19.7444483 L14.777385,15.8555983 L20.7118683,9.17444833 C20.898535,8.97223 20.99965,8.7 20.99965,8.42778167 L21,8.42778167 Z M10.4455167,10.411115 L9.06885,8.85559833 L18.93885,8.85559833 L17.5543667,10.411115 L10.4455167,10.411115 L10.4455167,10.411115 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#2E89B0" />
|
||||
<solid android:color="#20607C" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M9.35,22.3 L13.1840042,22.3 L13.1840042,16.379733 L14.4487167,16.379733 C16.4953333,16.379733 18.0936417,15.9233039 19.1939042,14.9897598 C20.3178375,14.0448193 20.85,12.6687324 20.85,10.8925278 C20.85,9.17330503 20.3522033,7.86253173 19.3111083,6.99727004 C18.2581875,6.12060241 16.709425,5.7 14.6982667,5.7 L9.3502875,5.7002873 L9.35,22.3 Z M13.1840042,8.60425301 L14.5565292,8.60425301 C15.5029792,8.60425301 16.17755,8.78662355 16.6154125,9.17371683 C17.0649667,9.57220647 17.2884404,10.1637639 17.2884404,10.9949323 C17.2884404,11.8032888 17.0518663,12.4290544 16.5076479,12.8616374 C15.9752746,13.282891 15.1586979,13.5329885 14.0820104,13.5329885 L13.1840042,13.5329885 L13.1840042,8.60425301 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<size
|
||||
android:width="40dp"
|
||||
android:height="40dp" />
|
||||
<solid android:color="#C15746" />
|
||||
<solid android:color="#983E44" />
|
||||
</shape>
|
||||
</item>
|
||||
<item>
|
||||
@@ -17,7 +17,7 @@
|
||||
android:pivotX="12"
|
||||
android:pivotY="12">
|
||||
<path
|
||||
android:fillColor="#FFF"
|
||||
android:fillColor="#000"
|
||||
android:pathData="M16.961,6.99999417 C15.9026933,6.99999417 14.84875,7.41071333 14.0726833,8.17973333 L8.2299,13.9907833 C7.02531667,15.1842833 6.69806667,16.9171333 7.28183167,18.3600667 C7.28183167,18.3600667 7.71838667,19.382475 8.14171167,19.80195 C8.54021,20.1968083 9.021355,20.4748717 9.508695,20.675795 C9.64324667,20.7452082 9.744875,20.770512 9.86146,20.80687 C9.877112,20.8116985 9.88986133,20.8240783 9.9055565,20.8287158 C11.3082398,21.2432442 12.8732065,20.907362 13.9403565,19.8019442 L17.4680065,16.3064942 L19.7830232,13.9907775 C21.4057398,12.3828775 21.4057398,9.80501083 19.7830232,8.26711083 C19.0774815,7.42821917 18.0191398,6.99999417 16.9608565,6.99999417 L16.961,6.99999417 Z M16.961,8.39813333 C17.6665417,8.39813333 18.3852667,8.67339667 18.8792333,9.162755 C19.3732,9.65211333 19.6509133,10.364305 19.6509133,11.0633717 C19.6509133,11.76245 19.3731067,12.452755 18.8792333,12.9421717 L16.4760167,15.323455 L12.6658,11.523155 L14.9987833,9.22832167 C15.5632167,8.66905667 16.1849333,8.39813333 16.9611167,8.39813333 L16.961,8.39813333 Z" />
|
||||
</group>
|
||||
</vector>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user