Created
August 20, 2020 18:58
-
-
Save manuelernesto/272df87b0bb62056cd06780cd8f7a704 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
override fun onActivityCreated(savedInstanceState: Bundle?) { | |
super.onActivityCreated(savedInstanceState) | |
room_btn_salvar.setOnClickListener { | |
val palestrante = Palestrante( | |
palestrante = room_et_nome.text.toString(), | |
tecnologia = room_et_tecnologia.text.toString(), | |
topico = room_et_topico.text.toString() | |
) | |
launch { | |
context?.let { | |
PalestranteDB.getDatabase(it).dao().salvar(palestrante) | |
Toast.makeText(it, "Cadastro com sucesso!", Toast.LENGTH_SHORT).show() | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment