From 70c4d272412819dc47ba0316b129c8eefc69a3e0 Mon Sep 17 00:00:00 2001 From: Tobias Zwick Date: Fri, 22 Jun 2018 20:25:15 +0200 Subject: [PATCH] wip redesign maxspeed form --- .../quests/max_speed/AddMaxSpeed.java | 4 +- .../quests/max_speed/AddMaxSpeedForm.java | 2 +- .../res/drawable/background_maxspeed_sign.xml | 19 +-- .../background_maxspeed_sign_no_frame.xml | 13 ++ .../background_rectangular_sign_blue.xml | 3 + .../background_rectangular_sign_yellow.xml | 3 + .../main/res/drawable/background_roadname.xml | 3 + app/src/main/res/drawable/ic_slow_zone.xml | 134 +++++++++++++----- .../main/res/layout-mcc302/quest_maxspeed.xml | 2 - .../res/layout-mcc302/quest_maxspeed_sign.xml | 2 + .../quest_maxspeed_zone_sign.xml | 16 +++ .../main/res/layout-mcc310/quest_maxspeed.xml | 2 - .../res/layout-mcc310/quest_maxspeed_sign.xml | 2 + .../quest_maxspeed_zone_sign.xml | 16 +++ app/src/main/res/layout/quest_maxspeed.xml | 98 +++++++------ app/src/main/res/layout/quest_maxspeed_ca.xml | 50 ------- .../layout/quest_maxspeed_living_street.xml | 6 + .../main/res/layout/quest_maxspeed_sign.xml | 35 +++++ .../res/layout/quest_maxspeed_sign_ca.xml | 43 ++++++ .../res/layout/quest_maxspeed_sign_us.xml | 42 ++++++ app/src/main/res/layout/quest_maxspeed_us.xml | 73 ---------- .../res/layout/quest_maxspeed_zone_sign.xml | 57 ++++++++ app/src/main/res/values/strings.xml | 9 +- res/country_metadata/isSlowZoneKnown.yml | 3 +- res/slow_zone.svg | 34 ++--- 25 files changed, 423 insertions(+), 248 deletions(-) create mode 100644 app/src/main/res/drawable/background_maxspeed_sign_no_frame.xml delete mode 100644 app/src/main/res/layout-mcc302/quest_maxspeed.xml create mode 100644 app/src/main/res/layout-mcc302/quest_maxspeed_sign.xml create mode 100644 app/src/main/res/layout-mcc302/quest_maxspeed_zone_sign.xml delete mode 100644 app/src/main/res/layout-mcc310/quest_maxspeed.xml create mode 100644 app/src/main/res/layout-mcc310/quest_maxspeed_sign.xml create mode 100644 app/src/main/res/layout-mcc310/quest_maxspeed_zone_sign.xml delete mode 100644 app/src/main/res/layout/quest_maxspeed_ca.xml create mode 100644 app/src/main/res/layout/quest_maxspeed_living_street.xml create mode 100644 app/src/main/res/layout/quest_maxspeed_sign.xml create mode 100644 app/src/main/res/layout/quest_maxspeed_sign_ca.xml create mode 100644 app/src/main/res/layout/quest_maxspeed_sign_us.xml delete mode 100644 app/src/main/res/layout/quest_maxspeed_us.xml create mode 100644 app/src/main/res/layout/quest_maxspeed_zone_sign.xml diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeed.java b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeed.java index e7cd02c6ac..5e702fc921 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeed.java +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeed.java @@ -80,8 +80,8 @@ else if (maxspeed != null) { boolean hasName = tags.containsKey("name"); - if(hasName) return R.string.quest_maxspeed_name_title; - else return R.string.quest_maxspeed_title_short; + if(hasName) return R.string.quest_maxspeed_name_title2; + else return R.string.quest_maxspeed_title_short2; } @NonNull @Override public Countries getEnabledForCountries() diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.java b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.java index e262d0d984..0dc16162c9 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.java +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/max_speed/AddMaxSpeedForm.java @@ -61,7 +61,7 @@ public class AddMaxSpeedForm extends AbstractQuestFormAnswerFragment } else { - setStreetSignLayout(R.layout.quest_maxspeed); + setStreetSignLayout(R.layout.quest_maxspeed_sign); } addOtherAnswers(); diff --git a/app/src/main/res/drawable/background_maxspeed_sign.xml b/app/src/main/res/drawable/background_maxspeed_sign.xml index 8f9bcbe8aa..6f6b4d886f 100644 --- a/app/src/main/res/drawable/background_maxspeed_sign.xml +++ b/app/src/main/res/drawable/background_maxspeed_sign.xml @@ -6,17 +6,10 @@ - - - - - - - - - - - + diff --git a/app/src/main/res/drawable/background_maxspeed_sign_no_frame.xml b/app/src/main/res/drawable/background_maxspeed_sign_no_frame.xml new file mode 100644 index 0000000000..9dedcb01f4 --- /dev/null +++ b/app/src/main/res/drawable/background_maxspeed_sign_no_frame.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/app/src/main/res/drawable/background_rectangular_sign_blue.xml b/app/src/main/res/drawable/background_rectangular_sign_blue.xml index 86a7d90473..70242bab2f 100644 --- a/app/src/main/res/drawable/background_rectangular_sign_blue.xml +++ b/app/src/main/res/drawable/background_rectangular_sign_blue.xml @@ -3,6 +3,9 @@ + diff --git a/app/src/main/res/drawable/background_rectangular_sign_yellow.xml b/app/src/main/res/drawable/background_rectangular_sign_yellow.xml index a056243f21..6f4308e203 100644 --- a/app/src/main/res/drawable/background_rectangular_sign_yellow.xml +++ b/app/src/main/res/drawable/background_rectangular_sign_yellow.xml @@ -3,6 +3,9 @@ + diff --git a/app/src/main/res/drawable/background_roadname.xml b/app/src/main/res/drawable/background_roadname.xml index 6f1c4194d7..c7bfdc6216 100644 --- a/app/src/main/res/drawable/background_roadname.xml +++ b/app/src/main/res/drawable/background_roadname.xml @@ -5,6 +5,9 @@ + diff --git a/app/src/main/res/drawable/ic_slow_zone.xml b/app/src/main/res/drawable/ic_slow_zone.xml index 2e0d5c834c..732871482b 100644 --- a/app/src/main/res/drawable/ic_slow_zone.xml +++ b/app/src/main/res/drawable/ic_slow_zone.xml @@ -1,39 +1,99 @@ - - - - - - - - - - - + android:width="100dp" + android:height="112dp" + android:viewportWidth="26.458332" + android:viewportHeight="29.633333"> + + + + + + + + + + + diff --git a/app/src/main/res/layout-mcc302/quest_maxspeed.xml b/app/src/main/res/layout-mcc302/quest_maxspeed.xml deleted file mode 100644 index b6f56c71ed..0000000000 --- a/app/src/main/res/layout-mcc302/quest_maxspeed.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/app/src/main/res/layout-mcc302/quest_maxspeed_sign.xml b/app/src/main/res/layout-mcc302/quest_maxspeed_sign.xml new file mode 100644 index 0000000000..16f4e3605a --- /dev/null +++ b/app/src/main/res/layout-mcc302/quest_maxspeed_sign.xml @@ -0,0 +1,2 @@ + + diff --git a/app/src/main/res/layout-mcc302/quest_maxspeed_zone_sign.xml b/app/src/main/res/layout-mcc302/quest_maxspeed_zone_sign.xml new file mode 100644 index 0000000000..da1d3b0743 --- /dev/null +++ b/app/src/main/res/layout-mcc302/quest_maxspeed_zone_sign.xml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/app/src/main/res/layout-mcc310/quest_maxspeed.xml b/app/src/main/res/layout-mcc310/quest_maxspeed.xml deleted file mode 100644 index dfbe67bfa3..0000000000 --- a/app/src/main/res/layout-mcc310/quest_maxspeed.xml +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/app/src/main/res/layout-mcc310/quest_maxspeed_sign.xml b/app/src/main/res/layout-mcc310/quest_maxspeed_sign.xml new file mode 100644 index 0000000000..af2fb06346 --- /dev/null +++ b/app/src/main/res/layout-mcc310/quest_maxspeed_sign.xml @@ -0,0 +1,2 @@ + + diff --git a/app/src/main/res/layout-mcc310/quest_maxspeed_zone_sign.xml b/app/src/main/res/layout-mcc310/quest_maxspeed_zone_sign.xml new file mode 100644 index 0000000000..2b0c26e6c8 --- /dev/null +++ b/app/src/main/res/layout-mcc310/quest_maxspeed_zone_sign.xml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/app/src/main/res/layout/quest_maxspeed.xml b/app/src/main/res/layout/quest_maxspeed.xml index e3d3cae484..d3d6f93ec5 100644 --- a/app/src/main/res/layout/quest_maxspeed.xml +++ b/app/src/main/res/layout/quest_maxspeed.xml @@ -1,66 +1,70 @@ + android:layout_height="match_parent"> + + android:orientation="vertical"> - + android:text="@string/quest_maxspeed_sign_question"/> + + + + - + + + + - - - - + android:layout_gravity="center" + tools:ignore="UselessParent"> + + - + - \ No newline at end of file + diff --git a/app/src/main/res/layout/quest_maxspeed_ca.xml b/app/src/main/res/layout/quest_maxspeed_ca.xml deleted file mode 100644 index 358446ddfc..0000000000 --- a/app/src/main/res/layout/quest_maxspeed_ca.xml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/quest_maxspeed_living_street.xml b/app/src/main/res/layout/quest_maxspeed_living_street.xml new file mode 100644 index 0000000000..64d76342a6 --- /dev/null +++ b/app/src/main/res/layout/quest_maxspeed_living_street.xml @@ -0,0 +1,6 @@ + + diff --git a/app/src/main/res/layout/quest_maxspeed_sign.xml b/app/src/main/res/layout/quest_maxspeed_sign.xml new file mode 100644 index 0000000000..c791fb671b --- /dev/null +++ b/app/src/main/res/layout/quest_maxspeed_sign.xml @@ -0,0 +1,35 @@ + + + + + + + + diff --git a/app/src/main/res/layout/quest_maxspeed_sign_ca.xml b/app/src/main/res/layout/quest_maxspeed_sign_ca.xml new file mode 100644 index 0000000000..528b8bca3d --- /dev/null +++ b/app/src/main/res/layout/quest_maxspeed_sign_ca.xml @@ -0,0 +1,43 @@ + + + + + + + + + diff --git a/app/src/main/res/layout/quest_maxspeed_sign_us.xml b/app/src/main/res/layout/quest_maxspeed_sign_us.xml new file mode 100644 index 0000000000..1e03e017b3 --- /dev/null +++ b/app/src/main/res/layout/quest_maxspeed_sign_us.xml @@ -0,0 +1,42 @@ + + + + + + + + + diff --git a/app/src/main/res/layout/quest_maxspeed_us.xml b/app/src/main/res/layout/quest_maxspeed_us.xml deleted file mode 100644 index 281517b390..0000000000 --- a/app/src/main/res/layout/quest_maxspeed_us.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/layout/quest_maxspeed_zone_sign.xml b/app/src/main/res/layout/quest_maxspeed_zone_sign.xml new file mode 100644 index 0000000000..fcf1bd12ec --- /dev/null +++ b/app/src/main/res/layout/quest_maxspeed_zone_sign.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 13a5c2b927..67e880f64f 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -203,9 +203,11 @@ However, before uploading your changes, the app checks with a <a href=\"https "Only on western side" "Only on eastern side" "Yes" - "What is the speed limit sign for this street?" + "What is the speed limit for this street?" "This speed limit looks implausible." - "There is no sign" + "A sign" + "It's within a zone" + "No sign, defaults apply" "Are you sure no limit is posted?" "Did you check at the ends of the street? If there are no signs along the whole street which apply for the highlighted section, default speed limits apply." @@ -513,7 +515,7 @@ Otherwise, you can download another keyboard in the app store. Popular keyboards Is this building completed? Never shown in %s Does this rest area have restroom facilities? - What is the speed limit sign for %s? + What is the speed limit for %s here? Reset both quest enablement and order to the default? "What was this building constructed as?" @@ -604,5 +606,6 @@ Otherwise, you can download another keyboard in the app store. Popular keyboards It has no house number The building was tagged as: Is this correct and is it not just part of a building? + What defines the speed limit? diff --git a/res/country_metadata/isSlowZoneKnown.yml b/res/country_metadata/isSlowZoneKnown.yml index 5360335fa4..b3116f6ee6 100644 --- a/res/country_metadata/isSlowZoneKnown.yml +++ b/res/country_metadata/isSlowZoneKnown.yml @@ -50,4 +50,5 @@ US-NY: true CA: false # according to wikipedia MX: true -PE: true \ No newline at end of file +PE: true +NZ: true diff --git a/res/slow_zone.svg b/res/slow_zone.svg index b27bff5b35..c8c570fc22 100644 --- a/res/slow_zone.svg +++ b/res/slow_zone.svg @@ -14,7 +14,7 @@ viewBox="0 0 26.458333 29.633333" version="1.1" id="svg5403" - inkscape:version="0.92.0 r15299" + inkscape:version="0.92.1 r15371" sodipodi:docname="slow_zone.svg"> @@ -25,16 +25,16 @@ borderopacity="1.0" inkscape:pageopacity="0.0" inkscape:pageshadow="2" - inkscape:zoom="1.4" - inkscape:cx="51.569946" - inkscape:cy="-4.6613242" + inkscape:zoom="2.8" + inkscape:cx="-25.778099" + inkscape:cy="86.5487" inkscape:document-units="mm" inkscape:current-layer="layer1" showgrid="true" - inkscape:window-width="931" - inkscape:window-height="804" - inkscape:window-x="871" - inkscape:window-y="89" + inkscape:window-width="1920" + inkscape:window-height="1017" + inkscape:window-x="-8" + inkscape:window-y="-8" inkscape:window-maximized="1" units="px" showguides="false"> @@ -121,17 +121,17 @@ rx="5.8208327" ry="5.8208356" /> + aria-label="××" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:10.58333302px;line-height:1.25;font-family:'Book Antiqua';-inkscape-font-specification:'Book Antiqua';letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332" + id="text4506"> + d="m 8.7137089,281.40043 1.4211021,-1.72599 -1.4314374,-1.7415 0.5839436,-0.63562 1.4055988,1.70532 1.405599,-1.70532 0.578776,0.63562 -1.436605,1.7415 1.42627,1.72599 -0.583944,0.63562 -1.395263,-1.68982 -1.3900965,1.68982 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Condensed';-inkscape-font-specification:'Roboto Condensed, ';stroke-width:0.26458332" + id="path4508" /> + d="m 13.695317,281.40043 1.421102,-1.72599 -1.431438,-1.7415 0.583944,-0.63562 1.405599,1.70532 1.405599,-1.70532 0.578776,0.63562 -1.436605,1.7415 1.42627,1.72599 -0.583944,0.63562 -1.395264,-1.68982 -1.390096,1.68982 z" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-family:'Roboto Condensed';-inkscape-font-specification:'Roboto Condensed, ';stroke-width:0.26458332" + id="path4510" />