Kotlin interface not stricter than Java superclass
Intrinsic check in Kotlin if view is null lead to crashes. view is not even used so we can accept null.
This commit is contained in:
parent
15207d1bf1
commit
cd84597058
|
@ -58,7 +58,7 @@ class FoodFragment : DaggerFragment() {
|
||||||
filterData()
|
filterData()
|
||||||
}
|
}
|
||||||
food_category.onItemSelectedListener = object : AdapterView.OnItemSelectedListener {
|
food_category.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) {
|
||||||
fillSubcategories()
|
fillSubcategories()
|
||||||
filterData()
|
filterData()
|
||||||
}
|
}
|
||||||
|
@ -69,7 +69,7 @@ class FoodFragment : DaggerFragment() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
food_subcategory.setOnItemSelectedListener(object : AdapterView.OnItemSelectedListener {
|
food_subcategory.setOnItemSelectedListener(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) {
|
||||||
filterData()
|
filterData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue