登录
首页 » Android » Android 加载HTML网页的内容并显示

Android 加载HTML网页的内容并显示

于 2022-05-26 发布 文件大小:7.02 kB
0 204
下载积分: 2 下载次数: 1

代码说明:

Android 加载HTML网页的内容并显示,装载HTML内容,本例子加载了一个图书销售网站的内容,加载了多张图片,加载的内容在android代码里生成,webView.loadDataWithBaseURL("图书名", html, "text/html", "utf-8", null);   webView.getSettings().setJavaScriptEnabled(true);   webView.setWebChromeClient(new WebChromeClient());

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Android 创建HttpPost对象 获取HTTP连接
    HttpGet httpGetRequest = new HttpGet(urlGet);//创建HttpPost对象   try {    HttpResponse httpResponse = new DefaultHttpClient().execute(httpGetRequest);    if(httpResponse.getStatusLine().getStatusCode()==200){//连接成功    String result = EntityUtils.toString(httpResponse.getEntity());//获得资源    result = result.replaceAll(" | | | ", "");//去掉信息中的回车和换行    EditText etGet = (EditText)findViewById(R.id.etGet);//获得EditText对象    etGet.setText(result);//为EditText设置内容    }   } catch (Exception e) {//捕获并打印异常    EditText etGet = (EditText)findViewById(R.id.etGet);//获得EditText对象    etGet.setText("连接出错:"+e.getMessage());//为EditText设置出错信息   }
    2022-03-21 18:06:57下载
    积分:1
  • RatingBarSample
    Android RatingBar投票条实例,玩Android手机的朋友可能就见到过,用手机访问门户网站经常会见到投票功能,投票之后用彩条来显示投票的结果,这个实例就是实现投票彩条,有兴趣的不妨下载源码一试。(The Android RatingBar Voting instance friends play Android phone may have seen, often using mobile phones to access the portal will see the voting function, after the voting, with the color bar to display the results of the vote, this instance is to achieve voting color bar, interested may wish to download the source code a try.)
    2013-04-09 19:08:54下载
    积分:1
  • IPC
    安卓系统中进程通信的例程,利用IPC机制进行服务端与客户端的进程通信(Andrews in the process of communication routines, the use of the IPC mechanism to carry out the process of communication services and the clients)
    2012-07-12 15:45:36下载
    积分:1
  • 省、市、县级联选择Android改进版
    Android盛市、县三级选择菜单,这是一个改进版,不过外观样式上还是需要再完善的,外观样式这个因人而好吧,自己美化,可融到自己的APP中使用。这款菜单同样是从外部调用的省市县(区)菜单内容,Android端实现了选择框并加载这些内容,最终实现的用户选择盛市县功能。
    2022-03-11 03:57:26下载
    积分:1
  • adriod 呼吸心率脉搏等的检测
    是一款相当不错的代码···能够实现心率检测,呼吸检测,人脸检测等等功能··相当不错的东西的
    2022-05-23 18:32:25下载
    积分:1
  • SDFileExplorerme
    android客户端方式实现文件浏览器功能(Implementation file browser function)
    2012-08-20 23:15:02下载
    积分:1
  • Android平台 ChaosSecurityCenter-master
    Android平台 好用的手势密码和指纹锁功能,值得拥有(Useful gesture password and fingerprint lock function, worth having)
    2020-06-20 05:00:01下载
    积分:1
  • BLE4.0聊天实例
    BLE4.0聊天实例
    2015-05-19下载
    积分:1
  • android 异步post发送请求获取json
    异步post发送请求获取json,有完整的demo,完整的jar包
    2014-10-21下载
    积分:1
  • android 瀑布流 完整实例源码下载
    android 瀑布流 完整实例源码下载
    2014-07-29下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载