Accordion

Overview

Accordions are used to show and hide text through user interaction.

circle-info

In Totalcross this component is called AccordionContainer

Source Code

Attributes

Type

Name

Description

int

minH

Minimum height of the closed accordion

Methods

Type

Name

Description

Constructor

AccordionContainer( )

Creates a empty accordion

Constructor

AccordionContainer(AccordionContainer.Group g)

Creates a list of accordions from the accordion group.

void

collapse( )

Closes the accordion

void

collapse(boolean showAnimation)

Closes the accordion with animation(depending on the parameter)

void

expand( )

Open the accordion

void

expand(boolean showAnimation)

Open the accordion with animation(depending on the parameter)

int

getPreferredHeight( )

Returns the accordion´s minimum height

boolean

isExpanded( )

Retorna true if the accordion is open

void

onAnimationFinished(ControlAnimation anim)

This method is called after the animation is finished

void

setPos(int x, int y)

Set the accordion´s x and y position

References

Last updated

Was this helpful?