How to show the output after user input editText?
I want to show output when user input something in the edit text.
This is the code snippet
submit.setOnClickListener {
Toast.makeText(requireActivity(), "$username", Toast.LENGTH_LONG).show()
}
When I run it, it will appear as this image
But when I change the "text:" into username and declaring
var username = binding.text
I will get this error
None of the following functions can be...