From 20b81bf41c33124b07bad0f3ea4621e0f8a6872b Mon Sep 17 00:00:00 2001 From: Jakob Nixdorf Date: Mon, 3 Jul 2017 08:18:05 +0200 Subject: [PATCH] Confirm before removing an account --- .../flocke/andotp/EntriesCardAdapter.java | 33 ++++++++++++++++--- .../shadowice/flocke/andotp/MainActivity.java | 4 +-- app/src/main/res/values/strings.xml | 2 +- 3 files changed, 31 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/org/shadowice/flocke/andotp/EntriesCardAdapter.java b/app/src/main/java/org/shadowice/flocke/andotp/EntriesCardAdapter.java index 7ca80371..d339a388 100644 --- a/app/src/main/java/org/shadowice/flocke/andotp/EntriesCardAdapter.java +++ b/app/src/main/java/org/shadowice/flocke/andotp/EntriesCardAdapter.java @@ -22,6 +22,9 @@ package org.shadowice.flocke.andotp; +import android.app.AlertDialog; +import android.content.Context; +import android.content.DialogInterface; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; @@ -38,10 +41,12 @@ import java.util.Collections; public class EntriesCardAdapter extends RecyclerView.Adapter implements ItemTouchHelperAdapter { + private Context context; private ArrayList entries; public ViewHolderEventCallback viewHolderEventCallback; - public EntriesCardAdapter(ArrayList entries) { + public EntriesCardAdapter(Context context, ArrayList entries) { + this.context = context; this.entries = entries; } @@ -75,9 +80,27 @@ public class EntriesCardAdapter extends RecyclerView.AdapterAccount removed Add Rename - "Remove " + Remove Camera permission not granted Storage permissions not granted Security warning