android中Webview的上一步和下一步按钮.如何? [英] back and forward button for webview in android. how?
问题描述
我正在处理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.
现在,我在页脚中包含了back
和forward
按钮,以执行普通浏览器中的功能.
Now I put a footer contains back
and forward
button, to do the functionality which in ordinary browser.
我可以处理webview
的back
和forward
.效果很好.
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);
.
这篇关于android中Webview的上一步和下一步按钮.如何?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!