Code example for ArrayList

Methods: clear

0
        // TODO Implement submenus 
        return null; 
    } 
 
    public void clear() { 
        mItems.clear();
    } 
 
    public void close() { 
    } 
     
    private int findItemIndex(int id) {
        final ArrayList<ActionMenuItem> items = mItems;
        final int itemCount = items.size();
        for (int i = 0; i < itemCount; i++) {
            if (items.get(i).getItemId() == id) {
                return i;
            } 
        } 
         
        return -1;