Skip to content
This repository was archived by the owner on Jul 11, 2025. It is now read-only.

Commit e7e3a85

Browse files
committed
Merge branch 'master' into retain
2 parents c9246ac + 1662a24 commit e7e3a85

45 files changed

Lines changed: 1462 additions & 11 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ConstraintLayoutExamples/build.gradle

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ buildscript {
2626
compileSdkVersion = 28
2727
targetSdkVersion = 28
2828

29-
appCompatVersion = '1.1.0-alpha03'
30-
constraintLayoutVersion = '2.0.0-beta3'
29+
appCompatVersion = '1.3.0-alpha01'
30+
constraintLayoutVersion = '2.0.0-beta8'
31+
emojiBundledVersion = '1.1.0'
3132
glideVersion = '4.8.0'
32-
kotlinVersion = '1.3.71'
33-
lifeCycleVersion = '2.0.0'
33+
kotlinVersion = '1.3.72'
34+
lifeCycleVersion = '2.2.0'
3435
lottieVersion = '2.5.1'
35-
materialVersion = '1.1.0-alpha05'
36+
materialVersion = '1.3.0-alpha02'
3637
junitVersion = '4.12'
37-
kotlin_version = '1.3.72'
3838
}
3939

4040
dependencies {

ConstraintLayoutExamples/motionlayoutintegrations/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ android {
3131

3232
dependencies {
3333
implementation fileTree(dir: 'libs', include: ['*.jar'])
34-
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
35-
implementation 'androidx.appcompat:appcompat:1.1.0'
34+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion"
35+
implementation "androidx.appcompat:appcompat:$appCompatVersion"
3636
implementation 'androidx.core:core-ktx:1.3.1'
37-
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-beta8'
38-
implementation 'androidx.emoji:emoji-bundled:1.1.0'
37+
implementation "androidx.constraintlayout:constraintlayout:$constraintLayoutVersion"
38+
implementation "androidx.emoji:emoji-bundled:$emojiBundledVersion"
3939
testImplementation 'junit:junit:4.13'
4040
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
4141
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
4242

43-
implementation 'com.google.android.material:material:1.1.0'
43+
implementation "com.google.android.material:material:$materialVersion"
4444
}

ConstraintLayoutExamples/motionlayoutintegrations/src/main/res/layout/activity_entrance.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
android:layout_width="match_parent"
88
android:layout_height="match_parent"
99
app:layoutDescription="@xml/activity_entrance_scene"
10+
app:motionDebug="SHOW_ALL"
1011
android:background="?attr/colorPrimary"
1112
tools:context=".Entrance">
1213

WebView/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
*.iml
2+
.gradle
3+
/local.properties
4+
/.idea/caches
5+
/.idea/libraries
6+
/.idea/modules.xml
7+
/.idea/workspace.xml
8+
/.idea/navEditor.xml
9+
/.idea/assetWizardSettings.xml
10+
.DS_Store
11+
/build
12+
/captures
13+
.externalNativeBuild
14+
.cxx

WebView/README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# WebView Demo
2+
3+
This sample will demonstrate best practices around the useage of the [AndroidX WebKit API][1].
4+
5+
## Pre-requisites
6+
7+
- Android SDK 29
8+
9+
## Getting Started
10+
11+
This sample uses the Gradle build system. To build this project, use the
12+
"gradlew build" command or use "Import Project" in Android Studio.
13+
14+
## Support
15+
16+
- Stack Overflow: [http://stackoverflow.com/questions/tagged/android][3]
17+
18+
If you've found an error in this sample, please file an issue:
19+
[https://github.com/android/views-widgets-samples][2]
20+
21+
Patches are encouraged, and may be submitted by forking this project and
22+
submitting a pull request through GitHub. Please see [CONTRIBUTING.md][4] for more details.
23+
24+
[1]: https://developer.android.com/reference/androidx/webkit/package-summary
25+
[2]: https://github.com/android/views-widgets-samples
26+
[3]: http://stackoverflow.com/questions/tagged/android
27+
[4]: https://github.com/android/views-widgets-samples/blob/master/CONTRIBUTING.md

WebView/app/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/build

WebView/app/build.gradle

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (C) 2020 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
apply plugin: 'com.android.application'
18+
apply plugin: 'kotlin-android'
19+
apply plugin: 'kotlin-android-extensions'
20+
21+
android {
22+
compileSdkVersion 29
23+
buildToolsVersion "29.0.3"
24+
25+
compileOptions {
26+
sourceCompatibility 1.8
27+
targetCompatibility 1.8
28+
}
29+
30+
defaultConfig {
31+
applicationId "com.android.samples.webviewdemo"
32+
minSdkVersion 21
33+
targetSdkVersion 29
34+
versionCode 1
35+
versionName "1.0"
36+
37+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
38+
}
39+
40+
buildTypes {
41+
release {
42+
minifyEnabled false
43+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
44+
}
45+
}
46+
47+
kotlinOptions.jvmTarget = "1.8"
48+
49+
viewBinding {
50+
enabled = true
51+
}
52+
}
53+
54+
dependencies {
55+
implementation fileTree(dir: 'libs', include: ['*.jar'])
56+
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
57+
implementation "androidx.appcompat:appcompat:$appcompat_version"
58+
implementation "androidx.constraintlayout:constraintlayout:$constraintlayout_version"
59+
implementation "androidx.core:core-ktx:$core_ktx_version"
60+
implementation "androidx.fragment:fragment-ktx:$fragment_ktx_version"
61+
implementation "androidx.webkit:webkit:$webkit_version"
62+
63+
implementation "com.google.android.material:material:$material_components_version"
64+
65+
testImplementation 'junit:junit:4.13'
66+
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
67+
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
68+
}

WebView/app/proguard-rules.pro

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Add project specific ProGuard rules here.
2+
# You can control the set of applied configuration files using the
3+
# proguardFiles setting in build.gradle.
4+
#
5+
# For more details, see
6+
# http://developer.android.com/guide/developing/tools/proguard.html
7+
8+
# If your project uses WebView with JS, uncomment the following
9+
# and specify the fully qualified class name to the JavaScript interface
10+
# class:
11+
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12+
# public *;
13+
#}
14+
15+
# Uncomment this to preserve the line number information for
16+
# debugging stack traces.
17+
#-keepattributes SourceFile,LineNumberTable
18+
19+
# If you keep the line number information, uncomment this to
20+
# hide the original source file name.
21+
#-renamesourcefileattribute SourceFile
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* Copyright (C) 2020 The Android Open Source Project
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
package com.android.samples.webviewdemo
18+
19+
import androidx.test.platform.app.InstrumentationRegistry
20+
import androidx.test.ext.junit.runners.AndroidJUnit4
21+
22+
import org.junit.Test
23+
import org.junit.runner.RunWith
24+
25+
import org.junit.Assert.*
26+
27+
/**
28+
* Instrumented test, which will execute on an Android device.
29+
*
30+
* See [testing documentation](http://d.android.com/tools/testing).
31+
*/
32+
@RunWith(AndroidJUnit4::class)
33+
class ExampleInstrumentedTest {
34+
@Test
35+
fun useAppContext() {
36+
// Context of the app under test.
37+
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
38+
assertEquals("com.android.samples.webviewdemo", appContext.packageName)
39+
}
40+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
<?xml version="1.0" encoding="utf-8"?><!--
2+
~ Copyright (C) 2020 The Android Open Source Project
3+
~
4+
~ Licensed under the Apache License, Version 2.0 (the "License");
5+
~ you may not use this file except in compliance with the License.
6+
~ You may obtain a copy of the License at
7+
~
8+
~ http://www.apache.org/licenses/LICENSE-2.0
9+
~
10+
~ Unless required by applicable law or agreed to in writing, software
11+
~ distributed under the License is distributed on an "AS IS" BASIS,
12+
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
~ See the License for the specific language governing permissions and
14+
~ limitations under the License.
15+
-->
16+
17+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
18+
package="com.android.samples.webviewdemo">
19+
20+
<uses-permission android:name="android.permission.INTERNET" />
21+
22+
<application
23+
android:allowBackup="true"
24+
android:icon="@mipmap/ic_launcher"
25+
android:label="@string/app_name"
26+
android:roundIcon="@mipmap/ic_launcher_round"
27+
android:supportsRtl="true"
28+
android:theme="@style/Theme.MyApp">
29+
<activity android:name=".MainActivity">
30+
<intent-filter>
31+
<action android:name="android.intent.action.MAIN" />
32+
33+
<category android:name="android.intent.category.LAUNCHER" />
34+
</intent-filter>
35+
</activity>
36+
</application>
37+
38+
</manifest>

0 commit comments

Comments
 (0)