File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change 30
30
import android .view .MenuInflater ;
31
31
import android .view .MenuItem ;
32
32
import android .view .View ;
33
+ import android .view .Window ;
34
+ import android .app .FragmentManager ;
35
+
33
36
34
37
// Methods that should be implemented in PApplet to maintain backward
35
38
// compatibility with (some) functionality available from Activity/Fragment
@@ -55,4 +58,8 @@ public interface ActivityAPI {
55
58
56
59
// IO events
57
60
public void onBackPressed ();
61
+
62
+ // Activity management
63
+ public FragmentManager getFragmentManager ();
64
+ public Window getWindow ();
58
65
}
Original file line number Diff line number Diff line change 32
32
import java .util .regex .*;
33
33
import java .util .zip .*;
34
34
35
+ import android .app .FragmentManager ;
36
+ import android .view .Window ;
35
37
import android .view .inputmethod .InputMethodManager ;
36
38
import android .app .Activity ;
37
39
import android .content .*;
@@ -657,6 +659,21 @@ synchronized public void onBackPressed() {
657
659
requestedBackPress = true ;
658
660
}
659
661
662
+
663
+ public FragmentManager getFragmentManager () {
664
+ return null ; //surface.getFragmentManager();
665
+ }
666
+
667
+
668
+ public Window getWindow (){
669
+ if (getActivity () == null ) {
670
+ return null ;
671
+ } else {
672
+ return getActivity ().getWindow ();
673
+ }
674
+ }
675
+
676
+
660
677
public void startActivity (Intent intent ) {
661
678
surface .startActivity (intent );
662
679
}
You can’t perform that action at this time.
0 commit comments