Skip to content

Commit

Permalink
add illustration for British vibrating button by @Cj-Malone (#2127)
Browse files Browse the repository at this point in the history
  • Loading branch information
westnordost committed Oct 8, 2020
1 parent 406a820 commit 6d21dbe
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 3 deletions.
@@ -1,12 +1,23 @@
package de.westnordost.streetcomplete.quests.traffic_signals_vibrate

import android.os.Bundle
import android.view.View
import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.quests.AYesNoQuestAnswerFragment
import kotlinx.android.synthetic.main.quest_traffic_lights_vibration.*

class AddTrafficSignalsVibrationForm : AYesNoQuestAnswerFragment<Boolean>() {

override val contentLayoutResId = R.layout.quest_traffic_lights_vibration

override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
super.onViewCreated(view, savedInstanceState)

// 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
buttonIllustrationImageView.setImageDrawable(resources.getDrawable(R.drawable.vibrating_button_illustration))
}

override fun onClick(answer: Boolean) { applyAnswer(answer) }

}
}
3 changes: 2 additions & 1 deletion app/src/main/res/authors.txt
Expand Up @@ -147,4 +147,5 @@ tourism_information_map.jpg CC0 https://commons.wikimedia.org/w
tourism_information_office.jpg CC-BY-SA 4.0 https://commons.wikimedia.org/wiki/File:Tourist_information_shop,_Delft_(2018).jpg (Donald Trung)
tourism_information_termina... CC-BY 4.0 https://wiki.openstreetmap.org/wiki/File:Uh%C5%99%C3%ADn%C4%9Bves,_Nov%C3%A9_n%C3%A1m%C4%9Bst%C3%AD,_informa%C4%8Dn%C3%AD_stojan.jpg (ŠJů)

vibrating_button_illustrati... CC-BY 4.0 Tobias Zwick
vibrating_button_illustrati... CC-BY 4.0 Tobias Zwick
vibrating_button_i... (MCC234) CC0 CJ Malone
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion app/src/main/res/layout/quest_traffic_lights_vibration.xml
Expand Up @@ -10,6 +10,7 @@


<ImageView
android:id="@+id/buttonIllustrationImageView"
android:layout_width="120dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
Expand All @@ -21,4 +22,4 @@
android:layout_height="wrap_content"
android:text="@string/quest_traffic_signals_vibrate_description"/>

</LinearLayout>
</LinearLayout>

0 comments on commit 6d21dbe

Please sign in to comment.