Skip to content

Commit

Permalink
added HU to quest fire_hydrant_diameter
Browse files Browse the repository at this point in the history
  • Loading branch information
dnet authored and westnordost committed May 5, 2024
1 parent 6269058 commit f46c856
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class AddFireHydrantDiameter : OsmFilterQuestType<FireHydrantDiameterAnswer>() {
"DE", "BE", "LU",
// not "AT", - see https://community.openstreetmap.org/t/streetcomplete-quest-zu-hydrantendurchmesser-in-osterreich/108899
"GB", "IE",
"HU",
"PL",
"FI",
"NL"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class AddFireHydrantDiameterForm : AbstractOsmQuestForm<FireHydrantDiameterAnswe

private fun getHydrantDiameterSignLayoutResId(countryCode: String): Int = when (countryCode) {
"DE", "BE", "LU", "AT" -> R.layout.quest_fire_hydrant_diameter_sign_de
"HU" -> R.layout.quest_fire_hydrant_diameter_sign_hu
"FI" -> R.layout.quest_fire_hydrant_diameter_sign_fi
"NL" -> R.layout.quest_fire_hydrant_diameter_sign_nl
"PL" -> R.layout.quest_fire_hydrant_diameter_sign_pl
Expand Down
34 changes: 34 additions & 0 deletions app/src/main/res/drawable/fire_hydrant_sign_hu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<vector
android:viewportHeight="330"
android:viewportWidth="735"
android:width="320dp"
android:height="143.67346dp"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt">
<path
android:fillColor="#fff"
android:pathData="m75,25h585c50,0 50,0 50,50v460c0,50 0,50 -50,50h-585c-50,0 -50,0 -50,-50v-460c0,-50 0,-50 50,-50z"
android:strokeColor="#ba2726"
android:strokeWidth="50"/>
<path
android:pathData="m131.45,214 l472.96,-0.236m-229.17,0.195 l0.266,148.2"
android:strokeColor="#000"
android:strokeWidth="18"/>
<path
android:pathData="m216.17,84.12h-83.834m43.834,-6.232v98.954"
android:strokeColor="#000"
android:strokeWidth="14"/>
<path
android:pathData="M0,0 H 735 V 610 H 0 Z">
<aapt:attr name="android:fillColor">
<gradient
android:startColor="@color/fade_out_transparent"
android:endColor="@color/fade_out"
android:startX="0"
android:endX="0"
android:startY="230"
android:endY="330"
android:type="linear" />
</aapt:attr>
</path>
</vector>
48 changes: 48 additions & 0 deletions app/src/main/res/layout/quest_fire_hydrant_diameter_sign_hu.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content">

<ImageView
android:id="@+id/fireHydrantSign"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/fire_hydrant_sign_hu" />

<EditText
android:id="@+id/diameterInput"
android:layout_width="136dp"
android:layout_height="wrap_content"
android:layout_marginLeft="120dp"
android:layout_marginTop="28dp"
android:background="#25000000"
android:includeFontPadding="false"
android:inputType="number"
android:maxLength="4"
tools:text="1500"
android:fontFamily="monospace"
android:textColor="@color/traffic_black"
android:textStyle="bold"
android:textSize="52dp"
android:textAlignment="center"
app:layout_constraintLeft_toLeftOf="@+id/fireHydrantSign"
app:layout_constraintTop_toTopOf="@+id/fireHydrantSign"
tools:ignore="RtlHardcoded,SpUsage" />

<ImageView
android:id="@+id/suggestionsButton"
android:layout_width="48dp"
android:layout_height="wrap_content"
app:srcCompat="@drawable/ic_arrow_expand_down_24dp"
app:tint="@color/traffic_black"
app:layout_constraintRight_toRightOf="@id/diameterInput"
app:layout_constraintTop_toTopOf="@id/diameterInput"
app:layout_constraintBottom_toBottomOf="@id/diameterInput"
style="@style/Base.Widget.AppCompat.Button.Borderless" />

</androidx.constraintlayout.widget.ConstraintLayout>

0 comments on commit f46c856

Please sign in to comment.