项目作者: k4zy

项目描述 :
useful WebView wrapper for Android
高级语言: Java
项目地址: git://github.com/k4zy/LxWebView.git
创建时间: 2015-03-21T15:47:47Z
项目社区:https://github.com/k4zy/LxWebView

开源协议:

下载


LxWebView

This library provides you useful interfaces which tells loading-state and intercept url loading.
You ,not any more, should not create Custom WebView Class.

Feature

  • Setting WebSettings with xml attributes.
  • Provides correct loading-state Callback ( show errorView and loadingView etc)
  • Provides loading url interceptor ( bind action with custom_url_sheme etc)

How to

Step 1. Add the JitPack repository to your build file
  1. repositories {
  2. maven {
  3. url "https://jitpack.io"
  4. }
  5. }
Step 2. Add the dependency in the form
  1. dependencies {
  2. compile 'com.github.kazy1991:LxWebView:0.2.0'
  3. }
Step 3. Replace LxWebView with Webview in your layout xml
  1. <RelativeLayout
  2. xmlns:android="http://schemas.android.com/apk/res/android"
  3. xmlns:lx="http://schemas.android.com/apk/res-auto"
  4. android:layout_width="match_parent"
  5. android:layout_height="match_parent">
  6. <com.kazy.lx.LxWebView
  7. android:id="@+id/webview_view"
  8. android:layout_width="match_parent"
  9. android:layout_height="match_parent"
  10. lx:dom_storage_enabled="true"
  11. lx:app_cache_enabled="true"
  12. lx:java_script_enabled="true"
  13. lx:built_in_zoom_controls="true"
  14. lx:display_zoom_controls="false"
  15. lx:load_with_overview_mode="true"
  16. lx:use_wide_view_port="true"></com.kazy.lx.LxWebView>
  17. </RelativeLayout>

License

  1. Copyright 2015 Kazuki Yoshida
  2. Licensed under the Apache License, Version 2.0 (the "License");
  3. you may not use this file except in compliance with the License.
  4. You may obtain a copy of the License at
  5. http://www.apache.org/licenses/LICENSE-2.0
  6. Unless required by applicable law or agreed to in writing, software
  7. distributed under the License is distributed on an "AS IS" BASIS,
  8. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  9. See the License for the specific language governing permissions and
  10. limitations under the License.