Skip to main content

UI Commands

The base class for behaviour controlling in Writeopia is WriteopiaManager and this is the entry point for all logic customization, with some exceptions.

In this section you will learn the default behaviour of Writeopia and how to customize it to fit your needs.

Swipe to Edit

One way to edit messages, checkbox, images, etc, is to to horizontally swipe to select the content.

swipe to edit sample

This behaviour is provided by the default implementations StoryStepDrawer. To provide this behavior to a custom drawer, use SwipeBox in your drawers.

Drag and Drop

The way to move content is to use the drag icon on the right side of it. Draging the icon will trigger the drag and drop action.

drag and drop sample

This behaviour is provided by the default implementations StoryStepDrawer. To provide this behavior to a custom drawer, use DragTargetWithDragItem in your drawers.

danger

This feature is currently under development and its usage is discouraged as the drag experience is still far away from the intended one. This feature is available only for testing purposes.

Backstack

Writeopia comes with a default implementation of Backstack that allows the user to undo and redo actions. You can call WriteopiaManager.undo() and WriteopiaManager.redo() to revert go to a previous stage or move to a forward stage, if there are stages available in the back stack.

backstack sample

You can edit the default behaviour by injecting your own implementation of BackstackManager in WriteopiaManager