Search in sources :

Example 1 with AccountVO

use of com.xabber.android.presentation.ui.contactlist.viewobjects.AccountVO in project xabber-android by redsolution.

the class ContactListFragment method onAccountMenuClick.

@Override
public void onAccountMenuClick(int adapterPosition, View view) {
    IFlexible item = adapter.getItem(adapterPosition);
    if (item != null && item instanceof AccountVO) {
        PopupMenu popup = new PopupMenu(getActivity(), view);
        popup.inflate(R.menu.item_account_group);
        ContextMenuHelper.setUpAccountMenu(getActivity(), presenter, ((AccountVO) item).getAccountJid(), popup.getMenu());
        popup.show();
    }
}
Also used : IFlexible(eu.davidea.flexibleadapter.items.IFlexible) AccountVO(com.xabber.android.presentation.ui.contactlist.viewobjects.AccountVO) PopupMenu(android.support.v7.widget.PopupMenu)

Aggregations

PopupMenu (android.support.v7.widget.PopupMenu)1 AccountVO (com.xabber.android.presentation.ui.contactlist.viewobjects.AccountVO)1 IFlexible (eu.davidea.flexibleadapter.items.IFlexible)1