Skip to content

Migrated to androidx, Android R preview #619

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ apply plugin: 'aar'
dependencies {
implementation name: "android"

implementationAar "com.android.support:support-v4:${supportLibsVersion}"
implementationAar 'androidx.legacy:legacy-support-v4:1.0.0'
implementationAar "com.google.android.support:wearable:${wearVersion}"
}

Expand Down
14 changes: 8 additions & 6 deletions core/src/processing/android/PFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,14 @@

package processing.android;

import android.support.annotation.IdRes;
import android.support.annotation.LayoutRes;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;

import androidx.annotation.IdRes;
import androidx.annotation.LayoutRes;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentTransaction;

import android.util.DisplayMetrics;
import android.content.Intent;
import android.content.pm.ActivityInfo;
Expand Down
2 changes: 1 addition & 1 deletion core/src/processing/android/PermissionRequestor.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.ActivityCompat;
import androidx.core.app.ActivityCompat;
import android.support.v4.os.ResultReceiver;

// A simple utility activity to request permissions in a service.
Expand Down
2 changes: 1 addition & 1 deletion core/src/processing/core/PApplet.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.support.annotation.LayoutRes;
import androidx.annotation.LayoutRes;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
Expand Down
9 changes: 5 additions & 4 deletions core/src/processing/core/PSurfaceNone.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import android.os.Handler;
import android.os.Looper;
import android.service.wallpaper.WallpaperService;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import androidx.core.app.ActivityCompat;
import androidx.core.content.ContextCompat;
import android.support.wearable.watchface.WatchFaceService;
import android.view.LayoutInflater;
import android.view.SurfaceHolder;
Expand Down Expand Up @@ -89,14 +89,15 @@ public AppComponent getComponent() {

@Override
public Context getContext() {
if (component.getKind() == AppComponent.FRAGMENT) {
return activity;
/*if (component.getKind() == AppComponent.FRAGMENT) {
return activity;
} else if (component.getKind() == AppComponent.WALLPAPER) {
return wallpaper;
} else if (component.getKind() == AppComponent.WATCHFACE) {
return watchface;
}
return null;
*/
}


Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
android.enableJetifier=true
android.useAndroidX=true
3 changes: 2 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#Thu Apr 30 13:02:23 PDT 2020
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.3-all.zip