@OnEvent(ClickEvent.class) static void onClick(ComponentContext c) { LearningStateComponent.incrementClickCountSync(c); } }
@OnEvent(ClickEvent.class) static void onClickSave(ComponentContext c) { StoryCardComponent.onToggleSavedStateSync(c); } }
@OnEvent(ClickEvent.class) static void onImageClick(SectionContext c) { VerySimpleGroupSection.onUpdateStateSync(c, 3); } }
@OnEvent(ClickEvent.class) static void onClickSecondChild(ComponentContext c, @Prop String secondChildString) { Toast.makeText( c.getAndroidContext(), "Second child clicked: " + secondChildString, LENGTH_SHORT) .show(); }
@OnEvent(RenderEvent.class) static RenderInfo onRender(ComponentContext c, @FromEvent Message model) { return model.createComponent(c); } }
@OnEvent(RenderEvent.class) static RenderInfo onRender(ComponentContext c, @FromEvent Datum model) { return model.createComponent(c); } }
@OnEvent(ClickEvent.class) static void onClick( ComponentContext c, @FromEvent View view) { FavouriteButton.toggleFavouritedSync(c); } }
@OnEvent(OnCheckIsSameItemEvent.class) protected static boolean onCheckIsSameItem( SectionContext c, @FromEvent Object previousItem, @FromEvent Object nextItem, @Prop(optional = true) Comparator isSameItemComparator) { return isSameItemComparator.compare(previousItem, nextItem) == 0; }
@OnEvent(ItemSelectedEvent.class) static void onScrollToPositionSelected( ComponentContext c, @FromEvent String newSelection, @Prop RecyclerCollectionEventsController eventsController) { eventsController.requestScrollToPositionWithSnap(Integer.parseInt(newSelection)); }
@OnEvent(ClickEvent.class) static void onClickLayoutProps( ComponentContext c, @Prop ExamplesLithoLabActivity.LabExampleController labExampleController) { labExampleController.setContentComponent(LearningLayoutPropsComponent.create(c).build()); }
@OnEvent(ClickEvent.class) static void onClickState( ComponentContext c, @Prop ExamplesLithoLabActivity.LabExampleController labExampleController) { labExampleController.setContentComponent(LearningStateComponent.create(c).build()); }
@OnEvent(ClickEvent.class) static void onClickTextWidget( ComponentContext c, @Prop ExamplesLithoLabActivity.LabExampleController labExampleController) { labExampleController.setContentComponent(LearningTextWidgetComponent.create(c).build()); }
@OnEvent(ClickEvent.class) static void onClickContainers( ComponentContext c, @Prop ExamplesLithoLabActivity.LabExampleController labExampleController) { labExampleController.setContentComponent(LearningContainersComponent.create(c).build()); }
@OnEvent(ClickEvent.class) static void onClick( ComponentContext c, @Prop RecyclerCollectionEventsController eventsController, @Param boolean forward) { if (forward) { eventsController.requestScrollToNextPosition(true); } else { eventsController.requestScrollToPreviousPosition(true); } } }
@OnEvent(ClickEvent.class) static void onClickClickEvents( ComponentContext c, @Prop ExamplesLithoLabActivity.LabExampleController labExampleController) { labExampleController.setContentComponent( LearningClickEventsComponent.create(c) .secondChildString("Prop passed in from parent.") .build()); }
@OnEvent(ClickEvent.class) static void onClickProps( ComponentContext c, @Prop ExamplesLithoLabActivity.LabExampleController labExampleController) { labExampleController.setContentComponent( LearningPropsComponent.create(c).text1("Props, world!").text2("World, props!").build()); }
@OnEvent(RenderEvent.class) protected static RenderInfo onRender( SectionContext c, @FromEvent Object model, @Param ComponentContext context) { return ComponentRenderInfo.create() .customAttribute("model", model) .component(Text.create(context).text(model.toString()).build()) .build(); }
@OnEvent(Object.class) public void testMethod( @Prop boolean testProp, @State int testState, @Param Object testPermittedAnnotation) { // Don't do anything. }
@OnEvent(Object.class) public void testEventMethod( @Prop boolean arg0, @Prop @Nullable Component arg4, @State int arg1, @Param Object arg2, @TreeProp long arg3) {}
@OnEvent(Object.class) public void testEventMethod1( @Prop boolean arg0, @State int arg1, @Param Object arg2, @Param T arg3, @FromEvent long arg4) {}