android webview hide,How to hide unhide webview in android

问题

I develop application which has webview and imageview(as toogle button), if button clicked then webview will be closed, if button clicked again, then webview will be opened. Is it possible in android? see the circle red with up arrow which can hide and unhide above banner

My reference like this application

7cb07fa29e682839081f879cc59cf201.png

回答1:

for hide the webview

mWebView.setVisibility(View.GONE);

for show the webview

mWebView.setVisibility(View.VISIBLE);

回答2:

Just take all of your view which you want to hide in one Linearlayout having orientation set to vertical and visiblity to visible and gone as below.

webView.setVisiblity(View.GONE);

and

webView.setVisiblity(View.Visible);

where webview is initialized by you xml's Webview.

I hope this works for you.

Thanks

回答3:

you use setvisibility() method are follow...

if hide webview

webview.setvisibility(view.GONE);

if visible webview then

webview.setvisibility(view.visible);

that's solve your problem

回答4:

You can use setVisibility() method to achieve that.. setVisibility(View.VISIBLE) to make the webview visible else setVisibility(View.INVISIBLE) or setVisibility(View.GONE) to make it vanish

来源:https://stackoverflow.com/questions/20282570/how-to-hide-unhide-webview-in-android

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值