Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1266 from matkoniecz/dogs
ask whatever leisure=dog_park is wheelchair accessible [generalize, change icon]
- Loading branch information
Showing
6 changed files
with
131 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
...va/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessOutside.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
package de.westnordost.streetcomplete.quests.wheelchair_access; | ||
|
||
import android.os.Bundle; | ||
import android.support.annotation.NonNull; | ||
|
||
import java.util.Map; | ||
|
||
import javax.inject.Inject; | ||
|
||
import de.westnordost.streetcomplete.R; | ||
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType; | ||
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder; | ||
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao; | ||
|
||
public class AddWheelchairAccessOutside extends SimpleOverpassQuestType | ||
{ | ||
@Inject public AddWheelchairAccessOutside(OverpassMapDataDao overpassServer) | ||
{ | ||
super(overpassServer); | ||
} | ||
|
||
@Override protected String getTagFilters() | ||
{ | ||
return "nodes, ways, relations with leisure=dog_park and !wheelchair"; | ||
} | ||
|
||
@Override public WheelchairAccessAnswerFragment createForm() | ||
{ | ||
return new AddWheelchairAccessOutsideForm(); | ||
} | ||
|
||
@Override public void applyAnswerTo(Bundle answer, StringMapChangesBuilder changes) | ||
{ | ||
String wheelchair = answer.getString(AddWheelchairAccessOutsideForm.ANSWER); | ||
if(wheelchair != null) | ||
{ | ||
changes.add("wheelchair", wheelchair); | ||
} | ||
} | ||
|
||
@Override public String getCommitMessage() { return "Add wheelchair access to outside places"; } | ||
@Override public int getIcon() { return R.drawable.ic_quest_wheelchair_outside; } | ||
@Override public int getTitle(@NonNull Map<String, String> tags) | ||
{ | ||
return R.string.quest_wheelchairAccess_outside_title; | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...e/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessOutsideForm.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.westnordost.streetcomplete.quests.wheelchair_access; | ||
|
||
import android.os.Bundle; | ||
import android.view.LayoutInflater; | ||
import android.view.View; | ||
import android.view.ViewGroup; | ||
|
||
import de.westnordost.streetcomplete.R; | ||
|
||
public class AddWheelchairAccessOutsideForm extends WheelchairAccessAnswerFragment | ||
{ | ||
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) | ||
{ | ||
View view = super.onCreateView(inflater, container, savedInstanceState); | ||
setContentView(R.layout.quest_wheelchair_outside_explanation); | ||
|
||
return view; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="128dp" | ||
android:height="128dp" | ||
android:viewportWidth="34" | ||
android:viewportHeight="34"> | ||
<path | ||
android:pathData="m33.87,16.93c0,9.35 -7.58,16.93 -16.93,16.93 -9.35,0 -16.93,-7.58 -16.93,-16.93 0,-9.35 7.58,-16.93 16.93,-16.93 9.35,0 16.93,7.58 16.93,16.93" | ||
android:fillColor="#9bbe55"/> | ||
<path | ||
android:pathData="m21.21,26.58a6.13,6.13 55.15,0 1,-6.24 2.34,6.13 6.13,55.15 0,1 -4.69,-4.73 6.13,6.13 55.15,0 1,2.4 -6.21" | ||
android:strokeLineCap="round" | ||
android:strokeColor="#000" | ||
android:strokeWidth="2.5" | ||
android:strokeAlpha="0.2"/> | ||
<path | ||
android:pathData="m25.4,26.44 l-3.24,-6.59 -5.62,-1.03c0.83,-1.78 1.35,-4.9 1.38,-6.79" | ||
android:strokeLineCap="round" | ||
android:strokeColor="#000" | ||
android:strokeWidth="3" | ||
android:strokeLineJoin="round" | ||
android:strokeAlpha="0.2"/> | ||
<path | ||
android:pathData="m9.86,15.94c1.04,-3.05 3.5,-3.97 8.06,-3.91" | ||
android:strokeLineCap="round" | ||
android:strokeColor="#000" | ||
android:strokeWidth="2.5" | ||
android:strokeLineJoin="round" | ||
android:strokeAlpha="0.2"/> | ||
<path | ||
android:pathData="M20.16,7.24m-2.69,0a2.69,2.69 0,1 1,5.37 0a2.69,2.69 0,1 1,-5.37 0" | ||
android:fillAlpha="0.2" | ||
android:fillColor="#000"/> | ||
<path | ||
android:pathData="m21.21,25.54a6.13,6.13 61.96,0 1,-6.24 2.34,6.13 6.13,55.15 0,1 -4.69,-4.73 6.13,6.13 55.15,0 1,2.4 -6.21" | ||
android:strokeLineCap="round" | ||
android:strokeColor="#fff" | ||
android:strokeWidth="2.5"/> | ||
<path | ||
android:pathData="m25.4,25.4 l-3.24,-6.59 -5.62,-1.03c0.83,-1.78 1.35,-4.9 1.38,-6.79" | ||
android:strokeLineCap="round" | ||
android:strokeColor="#fff" | ||
android:strokeWidth="3" | ||
android:strokeLineJoin="round"/> | ||
<path | ||
android:pathData="m9.86,14.9c1.04,-3.05 3.5,-3.97 8.06,-3.91" | ||
android:strokeLineCap="round" | ||
android:strokeColor="#fff" | ||
android:strokeWidth="2.5" | ||
android:strokeLineJoin="round"/> | ||
<path | ||
android:pathData="M20.16,6.2m-2.69,0a2.69,2.69 0,1 1,5.37 0a2.69,2.69 0,1 1,-5.37 0" | ||
android:fillColor="#fff"/> | ||
</vector> |
8 changes: 8 additions & 0 deletions
8
app/src/main/res/layout/quest_wheelchair_outside_explanation.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<TextView | ||
xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:id="@+id/description" | ||
android:layout_width="wrap_content" | ||
android:layout_height="wrap_content" | ||
android:text="@string/quest_wheelchairAccess_limited_description_outside" | ||
android:labelFor="@+id/nameInput"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters