Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (anotodo.size() > 0) {
- ano_todo.setPositiveButton("ok", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- SketchwareUtil.showMessage(getApplicationContext(), "CLICA E AGUARDE 3 SEGUNDOS PARA APAGAR!\n");
- n = 0;
- for (int _repeat50 = 0; _repeat50 < (int)(anotodo.size()); _repeat50++) {
- fire_ano.child(anotodo.get((int)n).get("keyy").toString()).removeValue();
- n++;
- }
- SketchwareUtil.showMessage(getApplicationContext(), "Você apagou tudo!");
- }
- });
- } else {
- SketchwareUtil.showMessage(getApplicationContext(), "Não há nada para apagar!");
- return;
- }
- ano_todo.setNegativeButton("Cancelar ", new DialogInterface.OnClickListener() {
- @Override
- public void onClick(DialogInterface _dialog, int _which) {
- ((BaseAdapter)listview2_ano.getAdapter()).notifyDataSetChanged();
- }
- });
- ano_todo.create().show();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement