首页 > 其他分享 >webview显示内置dialog

webview显示内置dialog

时间:2023-06-20 17:05:42浏览次数:24  
标签:内置 setTitle mWebView dialog activity 100 progress WebView webview


getWindow().requestFeature(Window.FEATURE_PROGRESS);

WebView mWebView = (WebView) findViewById(R.id.mywebview);

mWebView.getSettings().setJavaScriptEnabled(true);

final Activity activity = this;

mWebView.setWebChromeClient(new WebChromeClient(){

         public void onProgressChanged(WebView view, int progress) {
                 activity.setTitle("Loading...");
                 activity.setProgress(progress * 100);
                    if(progress == 100)
                       activity.setTitle("My title");
                 }
});

mWebView.loadUrl(URL);

标签:内置,setTitle,mWebView,dialog,activity,100,progress,WebView,webview
From: https://blog.51cto.com/u_16166892/6523949

相关文章

  • while和for、内置方法
     当while没有被关键字break主动结束的情况下  正常结束循环体代码之后会执行else的子代码while条件: 循环体代码else: 循环体代码正常运行结束则会执行该子代码块count=1whilecount<10:print(count)count+=1#打印0......
  • JAVA面试题解惑系列(八)——聊聊基本类型(内置类型)
    关键字:java面试题基本类型intlongbooleanfloatdoublechar作者:臧圩人(zangweiren)基本类型,或者叫做内置类型,是JAVA中不同于类的特殊类型。它们是我们编程中使用最频繁的类型,因此面试题中也总少不了它们的身影,在这篇文章中我们将从面试中常考的几个方面来回顾一......
  • 解析Spring内置作用域及其在实践中的应用
    摘要:本文详细解析了Spring的内置作用域,包括Singleton、Prototype、Request、Session、Application和WebSocket作用域,并通过实例讲解了它们在实际开发中的应用。本文分享自华为云社区《Spring高手之路4——深度解析Spring内置作用域及其在实践中的应用》,作者:砖业洋__。本文详细解析......
  • python基础知识——内置数据结构(集合)
    python中的set是指一系列无序元素的集合,其中的元素都是相异的,常见的操作包括集合的并集,交集和补集等操作。1、set的创建格式set_name={value1,value2,...}创建空的集合set_name=set()注意:在创建空的集合的时候不能使用set_name={}这样创建出来的是字典。例如animals......
  • python基础知识——内置数据结构(字典)
      字典是有“键-值”对组成的集合,字典中的“值”通过“键”来引用。“键-值”对之间用逗号隔开,并且被包含在一对花括号中。1、字典的创建格式dictionary_name={key1:value1,key2:value2,...}创建空的字典dictionary_name={}例如dict={'b':'beijing','s':......
  • 实验7 面向对象编程与内置模块
    实验任务1task1.py1classAccount:23def__init__(self,name,account_number,initial_amount=10):4self._name=name5self._card_no=account_number6self._balance=initial_amount7defdeposit(self,amount):......
  • 实验7 面向对象编程与内置模块
    task1源代码'''银行账户数据:持卡人姓名、账号、当前余额操作:取款、存款、打印账户信息、返回账户余额'''classAccount:'''一个模拟银行账户的简单类'''def__init__(self,name,account_number,initial_amount=10):''......
  • 面向对象编程和内置模块
    task11classAccount:23def__init__(self,name,account_number,initial_amount=10):4self._name=name5self._card_no=account_number6self._blance=initial_amount78defdeposit(self,amount):9......
  • 实验7 面向对象编程与内置模块
    实验任务1task1.py1classAccount:23def__init__(self,name,account_number,initial_amount=10):4self._name=name5self._card_no=account_number6self._balance=initial_amount7defdeposit(self,amount):......
  • 实验7 面向对象编程与内置模块
    task1源代码:classAccount:def__init__(self,name,account_number,initial_amount=10):self._name=nameself._card_no=account_numberself._balance=initial_amountdefdeposit(self,amount):self._balance+=amount......