Created
December 30, 2013 01:25
-
-
Save aleksanb/8176764 to your computer and use it in GitHub Desktop.
Dagens javasuppe
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getListView().setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() { | |
@Override | |
public boolean onItemLongClick(AdapterView<?> parent, View view, final int position, long id) { | |
new AlertDialog.Builder(getActivity()).setTitle("Delete preset?") | |
.setPositiveButton("Yes", new DialogInterface.OnClickListener() { | |
@Override | |
public void onClick(DialogInterface dialog, int which) { | |
presets.remove(position); | |
GhettoORM.getInstance().storePresets(presets); | |
adapter.notifyDataSetChanged(); | |
} | |
}).setNegativeButton("No", null) | |
.show(); | |
return false; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment