Giter VIP home page Giter VIP logo

zx5webview's Introduction

ZX5WebView

使用腾讯TBS x5 浏览器服务 封装常用功能,在使用中如果出现了什么不可预知的错误,可以使用基于原生WebView封装的ZWebView

具体集成版本参照lib中的jar版本
  1. 支持全屏播放视频
  2. 支持打开网页时进度条
  3. 支持文件选择
  4. 支持自动缩放网页
  5. 支持和网页进行js交互
  6. 支持H5定位
  7. 支持加载失败view

Gradle

app的build.gradle中添加

dependencies {
    implementation "com.android.support:appcompat-v7:你的版本号"
    implementation 'com.github.zcolin:ZX5WebView:latest.release'
}

工程的build.gradle中添加

allprojects {
	repositories {
		...
		maven { url 'https://jitpack.io' }
	}
}

USAGE

ZWebView:

webView = (ZX5WebView) findViewById(R.id.webView);
webView.setSupportVideoFullScreen(this)  //支持全屏播放视频
        .setSupportHorizontalProgressBar()//支持打开网页时顶部带有进度条
        .setSupportCircleProgressBar()    //支持圆形进度条
        .setSupportChooeFile(activity)   //支持文件选择
        .setSupportAutoZoom()            //支持自动缩放网页
        .setSupportH5Location()          //支持H5定位
        .setSupportErrorView()           //支持加载失败view
        .setSupportJsBridge();           //支持和网页进行js交互(网页端需要的js见app目录下assets/bridgewebview_html_demo)

zx5webview's People

Contributors

zcolin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.