diff --git a/app/src/main/java/com/codigoparallevar/minicards/CardActivity.java b/app/src/main/java/com/codigoparallevar/minicards/CardActivity.java index 5b9cee7..1329cf2 100644 --- a/app/src/main/java/com/codigoparallevar/minicards/CardActivity.java +++ b/app/src/main/java/com/codigoparallevar/minicards/CardActivity.java @@ -16,6 +16,9 @@ public class CardActivity extends AppCompatActivity { public final static String INTENT = "com.codigoparallevar.minicards.CARD"; public static final String CARD_PATH_KEY = "CARD_PATH"; + public static final String VISUALIZATION_MODE_KEY = "VISUALIZATION_MODE"; + public static final String DEVELOPER_VISUALIZATION_MODE = "DEVELOPER_VISUALIZATION_MODE"; + CanvasView canvasView; com.getbase.floatingactionbutton.AddFloatingActionButton AddPartButton; @@ -117,6 +120,11 @@ public class CardActivity extends AppCompatActivity { CardActivity.this.setDevMode(false); } }); + + String visualization_mode = this.getIntent().getStringExtra(VISUALIZATION_MODE_KEY); + if ((visualization_mode != null) && (visualization_mode.equals(DEVELOPER_VISUALIZATION_MODE))) { + devMode = true; + } } @Override @@ -194,9 +202,12 @@ public class CardActivity extends AppCompatActivity { } } - public static void openCard(Context context, CardFile cardfile) { + public static void openCard(Context context, CardFile cardfile, String visualizationMode) { Intent i = new Intent(INTENT); i.putExtra(CARD_PATH_KEY, cardfile.getPath()); + if (visualizationMode != null) { + i.putExtra(VISUALIZATION_MODE_KEY, visualizationMode); + } context.startActivity(i); } } diff --git a/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java b/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java index 9a052f6..eeb23a1 100644 --- a/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java +++ b/app/src/main/java/com/codigoparallevar/minicards/DeckPreviewActivity.java @@ -87,7 +87,8 @@ public class DeckPreviewActivity extends ReloadableAppCompatActivity { return; } - CardActivity.openCard(DeckPreviewActivity.this, cardfile); + CardActivity.openCard(DeckPreviewActivity.this, cardfile, + CardActivity.DEVELOPER_VISUALIZATION_MODE); } });