Skip to content

Commit

Permalink
feat: add bundle paramter for onCreate event of activity
Browse files Browse the repository at this point in the history
  • Loading branch information
SyntaxGalaxy committed Aug 15, 2024
1 parent fcfbf36 commit c2451b9
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,31 @@ public static Event getOnCreateEvent() {
defineEventText.setValue("onActivityCreate");

eventDefinationLayerTextLayer.add(defineEventText);

BlockModel bundle = new BlockModel();
bundle.setColor("#5533ff");
bundle.setRawCode("savedInstanceState");
bundle.setReturns(new String[] {"android.os.Bundle"});
bundle.setDragAllowed(true);
bundle.setBlockType(BlockModel.Type.number);

ArrayList<BlockLayerModel> bundleBlockLayerModels = new ArrayList<BlockLayerModel>();

BlockFieldLayerModel bundleBlockDefinationLayer = new BlockFieldLayerModel();

ArrayList<BlockFieldModel> bundleBlockDefinationLayerTextLayer =
new ArrayList<BlockFieldModel>();

BlockFieldModel bundleText = new BlockFieldModel();
bundleText.setValue("bundle");

bundleBlockDefinationLayerTextLayer.add(bundleText);

bundleBlockDefinationLayer.setBlockFields(bundleBlockDefinationLayerTextLayer);
bundleBlockLayerModels.add(bundleBlockDefinationLayer);
bundle.setBlockLayerModel(bundleBlockLayerModels);

eventDefinationLayerTextLayer.add(bundle);
eventDefinationLayer.setBlockFields(eventDefinationLayerTextLayer);

blockLayerModels.add(eventDefinationLayer);
Expand Down

0 comments on commit c2451b9

Please sign in to comment.