-
-
Save parzibyte/0ef4c42732c08ba3e13402563a011404 to your computer and use it in GitHub Desktop.
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
spinnerCategoriasReporteGastos.onItemSelectedListener = object : AdapterView.OnItemSelectedListener { | |
override fun onNothingSelected(parent: AdapterView<*>?) { | |
Toast.makeText(context!!, "onNothingSelected", Toast.LENGTH_SHORT).show() | |
} | |
override fun onItemSelected(parent: AdapterView<*>?, view: View?, position: Int, id: Long) { | |
if (!banderaListener) { | |
banderaListener = true | |
return | |
} | |
// A partir de acá, podemos asumir que la llamada es genuina y generada por el usuario | |
Toast.makeText(context!!, "onItemSelected position: $position. id: $id", Toast.LENGTH_SHORT).show() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment