Skip to content

Commit 90b3d18

Browse files
committed
we should set an id to the fragment manager
Signed-off-by: Umair Khan <[email protected]>
1 parent dedfec4 commit 90b3d18

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/processing/mode/android/AndroidBuild.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ private void writeMainActivity(final File srcDirectory) {
878878
writer.println("import processing.core.PApplet;");
879879
writer.println("public class MainActivity extends FragmentActivity {");
880880
writer.println(" PApplet fragment;");
881+
writer.println(" int viewPagerId = 0x1000;");
881882
writer.println(" @Override");
882883
writer.println(" protected void onCreate(Bundle savedInstanceState) {");
883884
writer.println(" super.onCreate(savedInstanceState);");
@@ -888,6 +889,7 @@ private void writeMainActivity(final File srcDirectory) {
888889
writer.println("window.setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,"
889890
+ "WindowManager.LayoutParams.FLAG_FULLSCREEN);");
890891
writer.println(" FrameLayout frame = new FrameLayout(this);");
892+
writer.println(" frame.setId(viewPagerId);");
891893
writer.println(" setContentView(frame, new LayoutParams(LayoutParams.MATCH_PARENT, "
892894
+ "LayoutParams.MATCH_PARENT));");
893895
writer.println(" if (savedInstanceState == null) {");

0 commit comments

Comments
 (0)