I created a RecyclerView with a PopupMenu in a Fragment, when you click in “Editar” i wanted to display a MaterialAlertDialog with an EditText to edit a text, but I can’t because everytime I tried the Logcat showed me an error. Here’s the code where the MaterialAlertDialog appears:
Code of MaterialAlertDialog in the RecyclerView
The variable “contexto” is the Context of the fragment that is “this.getContext()”.
And here is the error that the Logcat shows:
Error when it tries to display the MaterialAlertDialog
The objective is to show a MaterialAlertDialog that have an EditText where i will update the current text to what the user puts there:
An example of the MaterialAlertDialog that I want to put