Skip to content
This repository was archived by the owner on Dec 9, 2024. It is now read-only.

Commit d7d507d

Browse files
authored
Merge pull request #88 from android/yaraki/updates
Update all the samples
2 parents 0b98c29 + 6a78d3f commit d7d507d

File tree

66 files changed

+418
-498
lines changed

Some content is hidden

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

66 files changed

+418
-498
lines changed

ActivitySceneTransitionBasic/README.md

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,6 @@ See [Defining Custom Animations][1] for all the details on how to do this.
1616

1717
[1]: https://developer.android.com/training/material/animations.html#Transitions
1818

19-
Pre-requisites
20-
--------------
21-
22-
- Android SDK 28
23-
- Android Build Tools v28.0.3
24-
- Android Support Repository
25-
2619
Screenshots
2720
-------------
2821

ActivitySceneTransitionBasic/app/build.gradle

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,23 @@
1717
apply plugin: 'com.android.application'
1818

1919
android {
20-
compileSdkVersion 29
20+
compileSdkVersion 32
2121

2222
defaultConfig {
2323
applicationId 'com.example.android.activityscenetransitionbasic'
2424
minSdkVersion 14
25-
targetSdkVersion 29
25+
targetSdkVersion 32
2626
versionCode 1
2727
versionName '1.0'
2828
}
2929

3030
compileOptions {
31-
sourceCompatibility JavaVersion.VERSION_1_7
32-
targetCompatibility JavaVersion.VERSION_1_7
31+
sourceCompatibility JavaVersion.VERSION_1_8
32+
targetCompatibility JavaVersion.VERSION_1_8
3333
}
3434
}
3535

3636
dependencies {
37-
implementation 'androidx.appcompat:appcompat:1.0.2'
37+
implementation 'androidx.appcompat:appcompat:1.4.1'
3838
implementation 'com.squareup.picasso:picasso:2.4.0'
3939
}

ActivitySceneTransitionBasic/app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
<activity
3030
android:name=".MainActivity"
31-
android:label="@string/app_name">
31+
android:exported="true">
3232
<intent-filter>
3333
<action android:name="android.intent.action.MAIN" />
3434
<category android:name="android.intent.category.LAUNCHER" />

ActivitySceneTransitionBasic/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ buildscript {
2121
}
2222

2323
dependencies {
24-
classpath 'com.android.tools.build:gradle:4.2.2'
24+
classpath 'com.android.tools.build:gradle:7.2.1'
2525
}
2626
}
2727

ActivitySceneTransitionBasic/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
33
distributionPath=wrapper/dists
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists
6-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
6+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-all.zip
Lines changed: 22 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,35 @@
1-
2-
buildscript {
3-
repositories {
4-
google()
5-
mavenCentral()
6-
}
7-
8-
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.2.2'
10-
}
11-
}
1+
/*
2+
* Copyright 2022 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+
*/
1216

1317
apply plugin: 'com.android.application'
1418

15-
repositories {
16-
google()
17-
mavenCentral()
18-
}
19-
20-
dependencies {
21-
22-
23-
implementation "com.android.support:support-v4:28.0.0"
24-
implementation "com.android.support:support-v13:28.0.0"
25-
implementation "com.android.support:cardview-v7:28.0.0"
26-
implementation "com.android.support:appcompat-v7:28.0.0"
27-
28-
29-
30-
31-
32-
33-
}
34-
35-
// The sample build uses multiple directories to
36-
// keep boilerplate and common code separate from
37-
// the main sample code.
38-
List<String> dirs = [
39-
'main', // main sample code; look here for the interesting stuff.
40-
'common', // components that are reused by multiple samples
41-
'template'] // boilerplate code that is generated by the sample template process
42-
4319
android {
44-
compileSdkVersion 28
20+
compileSdkVersion 32
4521

4622
defaultConfig {
4723
minSdkVersion 19
48-
targetSdkVersion 28
24+
targetSdkVersion 32
4925
}
5026

5127
compileOptions {
52-
sourceCompatibility JavaVersion.VERSION_1_7
53-
targetCompatibility JavaVersion.VERSION_1_7
54-
}
55-
56-
sourceSets {
57-
main {
58-
dirs.each { dir ->
59-
java.srcDirs "src/${dir}/java"
60-
res.srcDirs "src/${dir}/res"
61-
}
62-
}
63-
androidTest.setRoot('tests')
64-
androidTest.java.srcDirs = ['tests/src']
65-
28+
sourceCompatibility JavaVersion.VERSION_1_8
29+
targetCompatibility JavaVersion.VERSION_1_8
6630
}
31+
}
6732

33+
dependencies {
34+
implementation 'androidx.appcompat:appcompat:1.4.1'
6835
}

BasicTransition/Application/src/main/AndroidManifest.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,12 @@
2525
android:allowBackup="true"
2626
android:icon="@drawable/ic_launcher"
2727
android:label="@string/app_name"
28-
android:theme="@style/AppTheme" >
28+
android:theme="@style/AppTheme">
2929
<activity
3030
android:name=".MainActivity"
31-
android:label="@string/app_name" >
31+
android:exported="true">
3232
<intent-filter>
3333
<action android:name="android.intent.action.MAIN" />
34-
3534
<category android:name="android.intent.category.LAUNCHER" />
3635
</intent-filter>
3736
</activity>

BasicTransition/Application/src/main/java/com/example/android/basictransition/BasicTransitionFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.example.android.basictransition;
1818

1919
import android.os.Bundle;
20-
import android.support.v4.app.Fragment;
20+
import androidx.fragment.app.Fragment;
2121
import android.transition.Scene;
2222
import android.transition.TransitionInflater;
2323
import android.transition.TransitionManager;

BasicTransition/Application/src/main/java/com/example/android/basictransition/MainActivity.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
package com.example.android.basictransition;
1919

2020
import android.os.Bundle;
21-
import android.support.v4.app.FragmentTransaction;
21+
22+
import androidx.fragment.app.Fragment;
23+
import androidx.fragment.app.FragmentTransaction;
2224
import android.view.Menu;
2325
import android.view.MenuItem;
2426
import android.widget.ViewAnimator;
@@ -31,7 +33,7 @@
3133

3234
/**
3335
* A simple launcher activity containing a summary sample description, sample log and a custom
34-
* {@link android.support.v4.app.Fragment} which can display a view.
36+
* {@link Fragment} which can display a view.
3537
* <p>
3638
* For devices with displays with a width of 720dp or greater, the sample log is always visible,
3739
* on other devices it's visibility is controlled by an item on the Action Bar.

BasicTransition/Application/src/main/java/com/example/android/common/activities/SampleActivityBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
package com.example.android.common.activities;
1818

1919
import android.os.Bundle;
20-
import android.support.v4.app.FragmentActivity;
20+
import androidx.fragment.app.FragmentActivity;
2121

2222
import com.example.android.common.logger.Log;
2323
import com.example.android.common.logger.LogWrapper;

0 commit comments

Comments
 (0)