Search in sources :

Example 1 with AnimatorExpandableItem

use of eu.davidea.samples.flexibleadapter.items.AnimatorExpandableItem in project FlexibleAdapter by davideas.

the class DatabaseService method newAnimatorItem.

/*
	 * Creates a special animator expandable item which is also a Header.
	 * The animator subItems will have linked its parent as Header!
	 */
public static AnimatorExpandableItem newAnimatorItem(int i) {
    AnimatorExpandableItem animatorItem = new AnimatorExpandableItem("AH" + i);
    animatorItem.setTitle("Animator Header " + i);
    for (int j = 1; j <= SUB_ITEMS; j++) {
        AnimatorSubItem subItem = new AnimatorSubItem(animatorItem.getId() + "-SB" + j, animatorItem);
        subItem.setTitle("Sub Item " + j);
        animatorItem.addSubItem(subItem);
    }
    return animatorItem;
}
Also used : AnimatorExpandableItem(eu.davidea.samples.flexibleadapter.items.AnimatorExpandableItem) AnimatorSubItem(eu.davidea.samples.flexibleadapter.items.AnimatorSubItem)

Aggregations

AnimatorExpandableItem (eu.davidea.samples.flexibleadapter.items.AnimatorExpandableItem)1 AnimatorSubItem (eu.davidea.samples.flexibleadapter.items.AnimatorSubItem)1