Skip to content

Latest commit

 

History

History
134 lines (83 loc) · 5.26 KB

README-ENGLISH.md

File metadata and controls

134 lines (83 loc) · 5.26 KB

Introduction to AgentWeb

AgentWeb is an Android WebView based, extremely easy to use and powerful library. Please refer to Sample above for detailed usage.

AgentWeb Sample Download

AgentWeb Sample shows AgentWeb library powerful features, detailed link, please click the download experience

download

  • Gradle

     api 'com.just.agentweb:agentweb:4.1.9' // (Required)
     api 'com.just.agentweb:filechooser:4.1.9'// (optional)
     api 'com.download.library:Downloader:4.1.9'// (optional)
    

use

Common use

mAgentWeb = AgentWeb.with(this)//传入Activity or Fragment
                .setAgentWebParent(mLinearLayout, new LinearLayout.LayoutParams(-1, -1))//Incoming AgentWeb parent control, if the parent control is RelativeLayout, then the second parameter needs to be passed RelativeLayout.LayoutParams, the first parameter and the second parameter should correspond.
                .useDefaultIndicator()// use the default onProgress bar
                .defaultProgressBarColor() // Use default onProgress bar color
                .setReceivedTitleCallback(mCallback) //Set the Web page title callback
                .createAgentWeb()//
                .ready()
                .go("http://www.jd.com");

renderings

Precautions

  • Alipay need to use the introduction of Alipay SDK, and dependent on the project, WeChat payment do not need to do any operation.
  • AgentWeb‘s internal use of AlertDialog depends on the AppCompat theme.
  • setAgentWebParent does not support ConstraintLayout.
  • mAgentWeb.getWebLifeCycle (). onPause (); Will pause all WebView in the application.
  • minSdkVersion 16 or less Customize WebView Please be aware of communication safety with JS.

ProGuard rules

If your project needs to be proguard , please add the following configuration

-keep class com.just.agentweb.** {
    *;
}
-dontwarn com.just.agentweb.**

Java injection class do not proguard, such as sample inside the AndroidInterface class, need Keep.

-keepclassmembers class com.just.library.agentweb.AndroidInterface {*;}

Thank you

have questions or have better suggestions

about me

An Android developer located in Shenzhen, if you have a better job offer available to me, please contact Email: [email protected]

Play reward

If you like the design of AgentWeb, you can invite the author to have a cup of coffee.

AgentWeb

AgentWeb is a WebView completely out of the Act, from the Activity, Fragment xml layout, independent of the Android Web library.

Finally, if the library is helpful to you, I may be grateful to the top right corner of my support, thanks! Of course, I prefer you to become a contributor to Fork PR. AgentWeb

License

License

Copyright (C)  Justson(https://github.com/Justson/AgentWeb)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.