Answer the question
In order to leave comments, you need to log in
How to set OnClick on back button in fragment?
Good afternoon. After creating a fragment and switching to it view!!.findNavController().navigate(fragment)
, by default I have an arrow in the upper left corner. The problem is that when you click on it, nothing happens, although with all its appearance it makes it clear that on click it should return to the previous fragment. How to set this behavior for the arrow? Somehow through xml, or set it to onClick? If asked, how? I googled about redefinition onOptionsItemSelected
, but by clicking on the arrow, the application does not enter this function. Worth true on
setDisplayHomeAsUpEnabled
andsetHomeButtonEnabled
Answer the question
In order to leave comments, you need to log in
https://stackoverflow.com/questions/35810229/how-t...
https://freakycoder.com/android-notes-24-how-to-ad...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question