Coder Social home page Coder Social logo

gtxweb's Introduction

GTXweb

腾讯TBS浏览服务二次封装

一、集成步骤 1、项目的build中

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

2、主model的build中

 implementation 'com.github.G452:GTXweb:0.0.3'
//androidx 用户
 implementation 'com.github.G452:GTXweb:0.0.9'

3、最后Sync Now搞定

二、使用步骤 1、在Application中初始化

   QbSdk.PreInitCallback cb = new QbSdk.PreInitCallback() {
        @Override
        public void onViewInitFinished(boolean arg0) {
            //x5內核初始化完成的回调,为true表示x5内核加载成功,否则表示x5内核加载失败,会自动切换到系统内核。
            Log.d("app", " onViewInitFinished is " + arg0);
        }
        @Override
        public void onCoreInitFinished() {
        }
    };
    //x5内核初始化接口
    QbSdk.initX5Environment(getApplicationContext(), cb);

2、布局内

 <com.tencent.smtt.sdk.WebView
    android:id="@+id/webView"
    android:layout_width="match_parent"
    android:layout_height="match_parent" />

Activity或Fragment中

3、 找到控件

 webView = (WebView) findViewById(R.id.webView);

4、 初始化webView

TXwebutiles.initweb(mUrl, webView, this);

三、新增富文本控件 RechTextView

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.