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

Commit ea320a9

Browse files
committed
udpates to android studio example
1 parent 08eb97a commit ea320a9

File tree

10 files changed

+2361
-5
lines changed

10 files changed

+2361
-5
lines changed

android_studio/ex2_fragmentsv4/.idea/compiler.xml

Lines changed: 22 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_studio/ex2_fragmentsv4/.idea/copyright/profiles_settings.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_studio/ex2_fragmentsv4/.idea/gradle.xml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_studio/ex2_fragmentsv4/.idea/misc.xml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_studio/ex2_fragmentsv4/.idea/modules.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

android_studio/ex2_fragmentsv4/app/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apply plugin: 'com.android.application'
22

33
android {
4-
compileSdkVersion 25
4+
compileSdkVersion 26
55
buildToolsVersion '25.0.2'
66

77
defaultConfig {
Binary file not shown.

android_studio/ex2_fragmentsv4/app/src/main/java/tutorials/androidstudio/fragmentsv4/MainActivity.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
package tutorials.androidstudio.fragmentsv4;
22

3-
43
import android.os.Bundle;
4+
import android.content.Intent;
55
import android.view.ViewGroup;
66
import android.widget.FrameLayout;
77
import android.support.v7.app.AppCompatActivity;
88

99
import processing.android.PFragment;
10-
import processing.android.ViewIdGenerator;
10+
import processing.android.CompatUtils;
1111
import processing.core.PApplet;
1212

1313
public class MainActivity extends AppCompatActivity {
@@ -17,7 +17,7 @@ public class MainActivity extends AppCompatActivity {
1717
protected void onCreate(Bundle savedInstanceState) {
1818
super.onCreate(savedInstanceState);
1919
FrameLayout frame = new FrameLayout(this);
20-
frame.setId(ViewIdGenerator.getUniqueId());
20+
frame.setId(CompatUtils.getUniqueViewId());
2121
setContentView(frame, new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
2222
ViewGroup.LayoutParams.MATCH_PARENT));
2323

@@ -33,4 +33,11 @@ public void onRequestPermissionsResult(int requestCode, String permissions[], in
3333
requestCode, permissions, grantResults);
3434
}
3535
}
36+
37+
@Override
38+
public void onNewIntent(Intent intent) {
39+
if (sketch != null) {
40+
sketch.onNewIntent(intent);
41+
}
42+
}
3643
}

android_studio/ex2_fragmentsv4/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
jcenter()
66
}
77
dependencies {
8-
classpath 'com.android.tools.build:gradle:2.3.2'
8+
classpath 'com.android.tools.build:gradle:2.3.3'
99

1010
// NOTE: Do not place your application dependencies here; they belong
1111
// in the individual module build.gradle files

0 commit comments

Comments
 (0)