Issue
I have seen many different solutions to add the back button in the Toolbar and then implement the behaviour through code. However, I was wondering if there is any way to add the button and implement its behaviour only using XML. For example, using a specific Android Theme?
Thanks.
Solution
By using a theme you can't achieve this. If you want to achieve only through XML, try adding a toolbar and inside keep a container layout (Relative or Linear) and add ImageButton with a back arrow vector. Give an onClick handler to it and implement the logic in the method.
Answered By - Prudhvi Raj Kumar
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.