diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2019-04-26 16:26:33 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-04-26 16:26:33 +0000 |
commit | 784cef15e5ab3b2ab68fd1054321a2ea4178541c (patch) | |
tree | e1753eb0cb58ef34b435b99163cec18ef3412057 | |
parent | d5dcf289d953343b533003c45ce54695657f4393 (diff) | |
parent | 7cc6ffe0f53a26d35107c170f7cfa2dd650a1bb2 (diff) | |
download | support-784cef15e5ab3b2ab68fd1054321a2ea4178541c.tar.gz |
Merge "AndroidX Webkit: add package-info.java" into androidx-master-dev
-rw-r--r-- | webkit/src/main/java/androidx/webkit/package-info.java | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/webkit/src/main/java/androidx/webkit/package-info.java b/webkit/src/main/java/androidx/webkit/package-info.java new file mode 100644 index 00000000000..12abf50ca5e --- /dev/null +++ b/webkit/src/main/java/androidx/webkit/package-info.java @@ -0,0 +1,67 @@ +/* + * Copyright 2019 The Android Open Source Project + * + * 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. + */ + +/** + * The androidx.webkit library is a static library you can add to your Android application + * in order to use android.webkit APIs that are not available for older platform versions. + * + * <p><b>Requirements</b> + * <p>The minimum sdk version to use this library is 14. You can manually specify it by adding the + * following to your build.gradle: + * <pre class="prettyprint">android { + * defaultConfig { + * minSdkVersion 14 + * } + * }</pre> + * + * <p><b>How to declare the dependencies to use the library</b> + * + * <p>Inside your app's build.gradle file, include this line in dependencies: + * <pre class="prettyprint">dependencies { + * ... + * implementation 'androidx.webkit:webkit:1.0.0' + * }</pre> + * + * <p><b>Migrating to androidx.webkit</b> + * + * <p>For static methods: + * + * <p>Old code: + * <pre class="prettyprint">if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) { + * WebView.startSafeBrowsing(appContext, callback); + * }</pre> + * + * <p>New code: + * <pre class="prettyprint"> + * if (WebViewFeature.isFeatureSupported(WebViewFeature.START_SAFE_BROWSING)) { + * WebViewCompat.startSafeBrowsing(appContext, callback); + * }</pre> + * + * <p>Or, if you are using a non-static method: + * + * <p>Old code: + * <pre class="prettyprint">if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + * myWebView.postVisualStateCallback(requestId, callback); + * }</pre> + * + * <p>New code: + * <pre class="prettyprint"> + * if (WebViewFeature.isFeatureSupported(WebViewFeature.VISUAL_STATE_CALLBACK)) { + * WebViewCompat.postVisualStateCallback(myWebView, requestId, callback); + * }</pre> + */ + +package androidx.webkit; |