diff --git a/app/src/main/assets/country_metadata/AZ.yml b/app/src/main/assets/country_metadata/AZ.yml index 2d1265dc22..3c9489b865 100644 --- a/app/src/main/assets/country_metadata/AZ.yml +++ b/app/src/main/assets/country_metadata/AZ.yml @@ -1,4 +1,5 @@ # Do not edit. Source files are in /res/country_metadata +isLivingStreetKnown: true mobileCountryCode: 400 officialLanguages: [az] orchardProduces: [apple, tomatoe, hazelnut, grape, persimmon, pear, chilli_pepper, sweet_pepper, plum, diff --git a/app/src/main/assets/country_metadata/IL.yml b/app/src/main/assets/country_metadata/IL.yml index 0fb6acb0aa..83daa26481 100644 --- a/app/src/main/assets/country_metadata/IL.yml +++ b/app/src/main/assets/country_metadata/IL.yml @@ -1,6 +1,7 @@ # Do not edit. Source files are in /res/country_metadata additionalStreetsignLanguages: [en] firstDayOfWorkweek: Su +isLivingStreetKnown: true isSlowZoneKnown: true mobileCountryCode: 425 officialLanguages: [heb, ar] diff --git a/app/src/main/assets/country_metadata/MU.yml b/app/src/main/assets/country_metadata/MU.yml index 416899eff4..477802f99a 100644 --- a/app/src/main/assets/country_metadata/MU.yml +++ b/app/src/main/assets/country_metadata/MU.yml @@ -1,6 +1,7 @@ # Do not edit. Source files are in /res/country_metadata isLeftHandTraffic: true isLivingStreetKnown: true +isSlowZoneKnown: true mobileCountryCode: 617 officialLanguages: [en, fr, mfe] orchardProduces: [tomatoe, tea, pineapple, coconut, banana, chilli_pepper, sweet_pepper] diff --git a/app/src/main/assets/country_metadata/NZ.yml b/app/src/main/assets/country_metadata/NZ.yml index 031d437481..661e4c8bf0 100644 --- a/app/src/main/assets/country_metadata/NZ.yml +++ b/app/src/main/assets/country_metadata/NZ.yml @@ -2,6 +2,7 @@ isAdvisorySpeedLimitKnown: true isLeftHandTraffic: true isLivingStreetKnown: true +isSlowZoneKnown: true mobileCountryCode: 530 officialLanguages: [en] orchardProduces: [grape, kiwi, apple, avocado, peach, tomatoe, orange, cherry, blueberry, pear, walnut, diff --git a/app/src/main/assets/country_metadata/US-NY.yml b/app/src/main/assets/country_metadata/US-NY.yml deleted file mode 100644 index 03573eb6e6..0000000000 --- a/app/src/main/assets/country_metadata/US-NY.yml +++ /dev/null @@ -1,2 +0,0 @@ -# Do not edit. Source files are in /res/country_metadata -isSlowZoneKnown: true diff --git a/app/src/main/assets/country_metadata/US.yml b/app/src/main/assets/country_metadata/US.yml index 40fbbb1e35..66ea725483 100644 --- a/app/src/main/assets/country_metadata/US.yml +++ b/app/src/main/assets/country_metadata/US.yml @@ -1,5 +1,6 @@ # Do not edit. Source files are in /res/country_metadata isAdvisorySpeedLimitKnown: true +isSlowZoneKnown: false mobileCountryCode: 310 officialLanguages: [en] orchardProduces: [grape, almond, tomatoe, apple, walnut, pistachio, peach, blueberry, grapefruit, plum, diff --git a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.java b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.java index 12a87c170f..5a5f0dcdd3 100644 --- a/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.java +++ b/app/src/main/java/de/westnordost/streetcomplete/quests/AbstractQuestAnswerFragment.java @@ -150,7 +150,7 @@ public View onCreateView(LayoutInflater inflater, ViewGroup container, @NonNull @Override public LayoutInflater onGetLayoutInflater(@Nullable Bundle savedInstanceState) { - // will always a layout inflater for the current country + // will always return a layout inflater for the current country return super.onGetLayoutInflater(savedInstanceState).cloneInContext(getContext()); } 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 6292fcdd7e..1aea6373e3 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 @@ -9,6 +9,7 @@ import android.view.inputmethod.EditorInfo; import android.widget.ArrayAdapter; import android.widget.EditText; +import android.widget.ImageView; import android.widget.RadioButton; import android.widget.RadioGroup; import android.widget.Spinner; @@ -233,6 +234,10 @@ private void confirmLivingStreet(final Runnable callback) { if(getActivity() == null) return; View view = getLayoutInflater().inflate(R.layout.quest_maxspeed_living_street_confirmation, null, false); + // this is necessary because the inflated image view uses the activity context rather than + // the fragment / layout inflater context' resources to access it's drawable + ImageView img = view.findViewById(R.id.imgLivingStreet); + img.setImageDrawable(getResources().getDrawable(R.drawable.ic_living_street)); new AlertDialogBuilder(getActivity()) .setView(view) .setTitle(R.string.quest_maxspeed_answer_living_street_confirmation_title) @@ -255,7 +260,7 @@ private void confirmNoSign(Runnable confirm) private void confirmNoSignSlowZone(Runnable confirm) { if(getActivity() == null) return; - View view = LayoutInflater.from(getContext()).inflate(R.layout.quest_maxspeed_no_sign_no_slow_zone_confirmation, null, false); + View view = getLayoutInflater().inflate(R.layout.quest_maxspeed_no_sign_no_slow_zone_confirmation, null, false); EditText input = view.findViewById(R.id.maxSpeedInput); input.setText("××"); input.setInputType(EditorInfo.TYPE_NULL); diff --git a/app/src/main/res/layout-mcc425/quest_maxspeed_zone_sign.xml b/app/src/main/res/layout-mcc425/quest_maxspeed_zone_sign.xml index bca6fb0d05..4c9e9f8461 100644 --- a/app/src/main/res/layout-mcc425/quest_maxspeed_zone_sign.xml +++ b/app/src/main/res/layout-mcc425/quest_maxspeed_zone_sign.xml @@ -22,7 +22,7 @@ android:gravity="center" android:textStyle="bold" android:textColor="@color/traffic_white" - android:textSize="44dp" + android:textSize="38dp" android:maxLength="2" tools:text="30"/> @@ -30,7 +30,7 @@ android:id="@+id/speedUnitSelect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-6dp" + android:layout_marginTop="-12dp" android:textColor="@color/traffic_white" android:visibility="gone" tools:visibility="visible" diff --git a/app/src/main/res/layout/quest_maxspeed.xml b/app/src/main/res/layout/quest_maxspeed.xml index b1624a5170..5f3fac1fd2 100644 --- a/app/src/main/res/layout/quest_maxspeed.xml +++ b/app/src/main/res/layout/quest_maxspeed.xml @@ -31,18 +31,19 @@ android:text="@string/quest_maxspeed_answer_sign" /> + android:text="@string/quest_maxspeed_answer_zone2" /> + android:text="@string/quest_maxspeed_answer_noSign2" /> + diff --git a/app/src/main/res/layout/quest_maxspeed_sign.xml b/app/src/main/res/layout/quest_maxspeed_sign.xml index 4d01938d3b..a20e3a16c7 100644 --- a/app/src/main/res/layout/quest_maxspeed_sign.xml +++ b/app/src/main/res/layout/quest_maxspeed_sign.xml @@ -29,7 +29,7 @@ android:id="@+id/speedUnitSelect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-6dp" + android:layout_marginTop="-14dp" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/quest_maxspeed_sign_ca.xml b/app/src/main/res/layout/quest_maxspeed_sign_ca.xml index dd7702e7f8..1d304eb952 100644 --- a/app/src/main/res/layout/quest_maxspeed_sign_ca.xml +++ b/app/src/main/res/layout/quest_maxspeed_sign_ca.xml @@ -38,7 +38,7 @@ android:id="@+id/speedUnitSelect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-6dp" + android:layout_marginTop="-14dp" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/quest_maxspeed_sign_us.xml b/app/src/main/res/layout/quest_maxspeed_sign_us.xml index bc0396c3bd..c9933aa924 100644 --- a/app/src/main/res/layout/quest_maxspeed_sign_us.xml +++ b/app/src/main/res/layout/quest_maxspeed_sign_us.xml @@ -38,7 +38,7 @@ android:id="@+id/speedUnitSelect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-6dp" + android:layout_marginTop="-14dp" android:visibility="gone" tools:visibility="visible" /> diff --git a/app/src/main/res/layout/quest_maxspeed_zone_sign.xml b/app/src/main/res/layout/quest_maxspeed_zone_sign.xml index 14991ad3aa..421bebbb3d 100644 --- a/app/src/main/res/layout/quest_maxspeed_zone_sign.xml +++ b/app/src/main/res/layout/quest_maxspeed_zone_sign.xml @@ -38,7 +38,7 @@ android:id="@+id/speedUnitSelect" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:layout_marginTop="-6dp" + android:layout_marginTop="-12dp" android:visibility="gone" tools:visibility="visible" />