fix nullable params
This commit is contained in:
parent
9401fd0d80
commit
112032ab0e
10 changed files with 10 additions and 10 deletions
|
@ -76,7 +76,7 @@ class TempTargetDialog : DialogFragmentWithDate() {
|
|||
val adapterReason = ArrayAdapter(context, R.layout.spinner_centered, reasonList)
|
||||
overview_temptarget_reason.adapter = adapterReason
|
||||
overview_temptarget_reason.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
val defaultDuration: Double
|
||||
val defaultTarget: Double
|
||||
when (reasonList[position]) {
|
||||
|
|
|
@ -74,7 +74,7 @@ class Comparator(injector: HasAndroidInjector) : Element(injector) {
|
|||
spinnerParams.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4))
|
||||
spinner.layoutParams = spinnerParams
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
value = Compare.values()[position]
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class ComparatorConnect(injector: HasAndroidInjector) : Element(injector) {
|
|||
spinnerParams.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4))
|
||||
spinner.layoutParams = spinnerParams
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
value = Compare.values()[position]
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ class ComparatorExists(injector: HasAndroidInjector) : Element(injector) {
|
|||
spinnerParams.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4))
|
||||
spinner.layoutParams = spinnerParams
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
value = Compare.values()[position]
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ class InputDelta(injector: HasAndroidInjector) : Element(injector) {
|
|||
spinnerParams.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4))
|
||||
spinner.layoutParams = spinnerParams
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
deltaType = DeltaType.values()[position]
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class InputDropdownMenu(injector: HasAndroidInjector) : Element(injector) {
|
|||
).also { it.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4)) }
|
||||
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
setValue(itemList[position].toString())
|
||||
}
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ class InputLocationMode(injector: HasAndroidInjector) : Element(injector) {
|
|||
spinnerParams.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4))
|
||||
spinner.layoutParams = spinnerParams
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
value = Mode.values()[position]
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class InputProfileName(injector: HasAndroidInjector) : Element(injector) {
|
|||
spinnerParams.setMargins(0, resourceHelper.dpToPx(4), 0, resourceHelper.dpToPx(4))
|
||||
spinner.layoutParams = spinnerParams
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
value = profileList[position].toString()
|
||||
}
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ class TriggerConnector(injector: HasAndroidInjector) : Trigger(injector) {
|
|||
params.weight = 1.0f
|
||||
spinner.layoutParams = params
|
||||
spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View, position: Int, id: Long) {
|
||||
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) {
|
||||
setType(Type.values()[position])
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ class EditQuickWizardDialog : DaggerDialogFragment() {
|
|||
overview_editquickwizard_usetemptarget_spinner.setSelection(entry.useTempTarget())
|
||||
|
||||
overview_editquickwizard_usecob_spinner.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
||||
override fun onItemSelected(parent: AdapterView<*>, view: View, position: Int, id: Long) = processCob()
|
||||
override fun onItemSelected(parent: AdapterView<*>, view: View?, position: Int, id: Long) = processCob()
|
||||
override fun onNothingSelected(parent: AdapterView<*>) {}
|
||||
}
|
||||
processCob()
|
||||
|
|
Loading…
Reference in a new issue