Java 类org.androidannotations.annotations.ItemLongClick 实例源码

项目:monodict    文件:BrowserBookmarksActivity.java   
@ItemLongClick(android.R.id.list)
void onListItemLongClick(int position) {
    final Bookmark bookmark = listAdapter.getItem(position);
    activityHelper
            .buildConfirmDialog(new MaterialDialog.ButtonCallback() {
                @Override
                public void onPositive(MaterialDialog materialDialog) {
                    try {
                        databaseHelper.deleteBookmark(bookmark);
                    } catch (SQLException e) {
                        activityHelper.showError(e);
                        return;
                    }
                    activityHelper.showToast(getResources().getString(R.string.message_item_removed, bookmark.getTitle()));
                    loadBookmarks();
                }
            })
            .title(R.string.action_delete)
            .content(R.string.message_confirm_delete)
            .show();
}
项目:Coding-Android    文件:RefResourceActivity.java   
@ItemLongClick(R.id.listView)
void itemLongClick(RefResourceObject item) {
    new AlertDialog.Builder(this)
            .setItems(new String[]{"取消关联"},
                    new DialogInterface.OnClickListener() {
                        @Override
                        public void onClick(DialogInterface dialog, int which) {
                            if (which == 0) {
                                deleteRef(item);
                            }
                        }
                    })
            .show();
}
项目:Coding-Android    文件:AttachmentsActivity.java   
@ItemLongClick
void listViewItemLongClicked(int position) {
    showPop(null, position - 1);
}
项目:Coding-Android    文件:ProjectAttachmentFragment.java   
@ItemLongClick
public void listViewItemLongClicked(int position) {
    showPop(position);
}
项目:moVirt    文件:EditAccountsActivity.java   
@ItemLongClick(R.id.listView)
void listViewItemLongClicked(int position) {
    selectedListItem = position;
    listView.setItemChecked(position, true);
    updateSelection();
}
项目:moVirt    文件:EditTriggersActivity.java   
@ItemLongClick(R.id.listView)
void listViewItemLongClicked(int position) {
    selectedListItem = position;
    listView.setItemChecked(position, true);
    updateSelection();
}