When creating new card jump straight to dev mode.
This commit is contained in:
parent
42e67dc6a6
commit
4d8cdcb82d
@ -16,6 +16,9 @@ public class CardActivity extends AppCompatActivity {
|
|||||||
|
|
||||||
public final static String INTENT = "com.codigoparallevar.minicards.CARD";
|
public final static String INTENT = "com.codigoparallevar.minicards.CARD";
|
||||||
public static final String CARD_PATH_KEY = "CARD_PATH";
|
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;
|
CanvasView canvasView;
|
||||||
com.getbase.floatingactionbutton.AddFloatingActionButton AddPartButton;
|
com.getbase.floatingactionbutton.AddFloatingActionButton AddPartButton;
|
||||||
@ -117,6 +120,11 @@ public class CardActivity extends AppCompatActivity {
|
|||||||
CardActivity.this.setDevMode(false);
|
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
|
@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);
|
Intent i = new Intent(INTENT);
|
||||||
i.putExtra(CARD_PATH_KEY, cardfile.getPath());
|
i.putExtra(CARD_PATH_KEY, cardfile.getPath());
|
||||||
|
if (visualizationMode != null) {
|
||||||
|
i.putExtra(VISUALIZATION_MODE_KEY, visualizationMode);
|
||||||
|
}
|
||||||
context.startActivity(i);
|
context.startActivity(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -87,7 +87,8 @@ public class DeckPreviewActivity extends ReloadableAppCompatActivity {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
CardActivity.openCard(DeckPreviewActivity.this, cardfile);
|
CardActivity.openCard(DeckPreviewActivity.this, cardfile,
|
||||||
|
CardActivity.DEVELOPER_VISUALIZATION_MODE);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user