Skip to content

Commit

Permalink
some corrections after testing
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Aug 5, 2018
1 parent bb5b3d3 commit 310a830
Show file tree
Hide file tree
Showing 14 changed files with 23 additions and 14 deletions.
1 change: 1 addition & 0 deletions app/src/main/assets/country_metadata/AZ.yml
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
1 change: 1 addition & 0 deletions app/src/main/assets/country_metadata/IL.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
1 change: 1 addition & 0 deletions app/src/main/assets/country_metadata/MU.yml
Original file line number Diff line number Diff line change
@@ -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]
Expand Down
1 change: 1 addition & 0 deletions app/src/main/assets/country_metadata/NZ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/assets/country_metadata/US-NY.yml

This file was deleted.

1 change: 1 addition & 0 deletions app/src/main/assets/country_metadata/US.yml
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand All @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/res/layout-mcc425/quest_maxspeed_zone_sign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
android:gravity="center"
android:textStyle="bold"
android:textColor="@color/traffic_white"
android:textSize="44dp"
android:textSize="38dp"
android:maxLength="2"
tools:text="30"/>

<Spinner
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"
Expand Down
9 changes: 5 additions & 4 deletions app/src/main/res/layout/quest_maxspeed.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,19 @@
android:text="@string/quest_maxspeed_answer_sign" />

<RadioButton
android:id="@+id/no_sign"
android:id="@+id/zone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/quest_maxspeed_answer_noSign2" />
android:text="@string/quest_maxspeed_answer_zone2" />

<RadioButton
android:id="@+id/zone"
android:id="@+id/no_sign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="@string/quest_maxspeed_answer_zone2" />
android:text="@string/quest_maxspeed_answer_noSign2" />

</RadioGroup>

</LinearLayout>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/quest_maxspeed_sign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/quest_maxspeed_sign_ca.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/quest_maxspeed_sign_us.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/quest_maxspeed_zone_sign.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
/>
Expand Down

0 comments on commit 310a830

Please sign in to comment.