I have a simple question to understand but I have not yet found a solution.
I have a Webview
in my MainActivity
where a responsive WebSite is created that I created, in this WebSite I have a shopping cart that clicking on it opens a div
with user items, and at the top right of div
a button with an 'X' that when clicked calls a function fechaCarrinho()
in javascript
.
The problem is that when the person is in android
(WebView) he clicks the back button on the phone and the application closes. I wanted to click on the back button (on the cell button) to call the fechaCarrinho()
function of the Web page, how do I do this?
Thank you in advance.