Skip to content

View Flipper

Overview

A ViewFlipper is a component that flips through the various views in a sequence like a slideshow. The views are similar to a slide in a slideshow. In a slide show, only one slide is visible at a time, likewise only one view can be visible at a time. A view can be any component or an image.

Properties

Add Images From String

( Setter only )
Type: Text

The images for the View Flipper to be animated.
Use comma as a seperator to seperate different images.
Example: image1.png,image2.png

Background Color

( Getter + Setter )
Type: Color

The background color with which the View Flipper is shown.

Flip Interval

( Getter + Setter )
Type: Number

The amount of time to wait before flipping(i.e switching to another view) in milliseconds

Height

( Getter + Setter )
Type: Number

The height with which the View Flipper is displayed.

Height Percent

( Setter Only )
Type: Number

The height with which the View Flipper is displayed in terms of precentage of the whole screen height.

Swipeable

( Getter + Setter )
Type: Boolean

Determines if the View Flipper will flip on swipe gestures.

Visible

( Getter + Setter )
Type: Boolean

Determines whether the View Flipper is visible on the screen and shown to the user or not.

Options
true The View Flipper is shown to the user.
false The View Flipper is not shown to the user.

Width

( Getter + Setter )
Type: Number

The width with which the View Flipper is displayed.

Width Percent

( Setter Only )
Type: Number

The width with which the View Flipper is displayed in terms of precentage of the whole screen width.

Methods

Add Component To View

( Component component )

Add a component to the ViewFlipper. The order in which the components are shown are based on the order in which they are added to the ViewFlipper.
The component which is added first will be the first view to be seen on the ViewFlipper and so on.

Params
component Component: The component which is to be added as a view to the ViewFlipper

Add Images To View

( List images )

Add images from a list, as views to the ViewFlipper.

Params
images List: The List containing the path to the images that are to be added as views. Each item in images is the path to an image.

Show Next

( None )

Show the next view that is, flip through the current view to reveal the next one.

Show Previous

( None )

Show the previous view that is, flip through the current view in the reverse direction.

Start Flipping

( None )

Start flipping through the views automatically, pausing on each view for the time specified by
Flip Interval

Stop Flipping

( None )

Stop the automatic flipping of the ViewFlipper.

Is Flipping

( None )

Return a Boolean whether the ViewFlipper is automatically flipping through the views added to it.

Events

This component has no events.