android中Webview的上一步和下一步按钮.如何? [英] back and forward button for webview in android. how?

查看:80
本文介绍了android中Webview的上一步和下一步按钮.如何?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理webview.如果单击webview中的任何内容,它将使用webviewclient类重定向到另一个链接.

I'm working on a webview. If I click anything in my webview, it redirects to another link by using webviewclient class.

现在,我在页脚中包含了backforward按钮,以执行普通浏览器中的功能.

Now I put a footer contains back and forward button, to do the functionality which in ordinary browser.

我可以处理webviewbackforward.效果很好.

I can work about to back and forward of webview. It works fine.

现在我要在页脚中设置一个按钮,最初不应该将焦点放在按钮上,它应该可点击且不能动态点击.

Now I want to set a buttons in the footer are initially should be not focused and it should work clickable and not clickable dynamically.

推荐答案

我使用canGoBack()canGoforward()解决了此问题,我们可以使用obj_name.setEnabled(false);禁用这些按钮.

I solved this problem using canGoBack() and canGoforward(), we can disable those buttons using obj_name.setEnabled(false);.

这是Google的一个很好的示例,值得一看.

这篇关于android中Webview的上一步和下一步按钮.如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆