Clear the Action items in Quickaction view android

238 Views Asked by At

i am working with Quickaction in android.

i want to set the items of Quickaction dynamically but at the time of adding the items i want to remove the previews action items.

But there is no any property to remove or clear the Quickaction items.

please find -http://www.androidpatterns.com/wp-content/uploads/QuickActions.png

Quickaction like shows in image.

project - https://github.com/lorensiuswlt/NewQuickAction

for quickaction i am using above github project.

Please help me to out this mesh.

Thanks in advance.

1

There are 1 best solutions below

0
On

Add this to QuickAction.java, then call resetActionItemList() when you want to recreate the list.

/**
 * reset the action item list
 * added by G. M. on 5/14/2014
 * 
 */
public void resetActionItemList() {
    actionItems.clear();

    mChildPos  = 0;
    mInsertPos = 0;

    if (mOrientation == HORIZONTAL) {
        setRootViewId(R.layout.popup_horizontal);
    } else {
        setRootViewId(R.layout.popup_vertical);
    }

    return; 
}