From b580a559c61e9bf62c32b69918c68cc71b3b6a5d Mon Sep 17 00:00:00 2001 From: Sander Bogaert Date: Sun, 26 Jun 2011 15:00:53 +0200 Subject: [PATCH] Skelet of dialog-callback. Actually just testing the git stuff is set up right. --- .../k9/activity/setup/AccountSetupIndex.java | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/src/com/fsck/k9/activity/setup/AccountSetupIndex.java b/src/com/fsck/k9/activity/setup/AccountSetupIndex.java index 185e8167c..bcde6c7cc 100644 --- a/src/com/fsck/k9/activity/setup/AccountSetupIndex.java +++ b/src/com/fsck/k9/activity/setup/AccountSetupIndex.java @@ -1,6 +1,7 @@ package com.fsck.k9.activity.setup; import android.accounts.AccountManager; +import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.os.AsyncTask; @@ -24,6 +25,10 @@ import static com.fsck.k9.activity.setup.AccountSetupBasics.*; public class AccountSetupIndex extends K9ListActivity implements OnItemClickListener, OnClickListener { private static final String DEVICE_STRING = "Device"; + private static final int DIALOG_NEW_ACCOUNT = 0; + private static final int DIALOG_DEVICE_ACCOUNT = 1; + private static final int DIALOG_BACKUP_ACCOUNT = 2; + public enum SuggestionType { DEVICE, BACKUP, NEW } public static void actionNewAccount(Context context) { @@ -76,6 +81,29 @@ public class AccountSetupIndex extends K9ListActivity implements OnItemClickList AccountSetupBasics.actionNewAccount(this); } + /* + Dialogues + */ + protected Dialog onCreateDialog(int dialog_id){ + Dialog dialog; + + switch (dialog_id){ + case DIALOG_NEW_ACCOUNT: + dialog = new Dialog(this); + break; + case DIALOG_DEVICE_ACCOUNT: + dialog = new Dialog(this); + break; + case DIALOG_BACKUP_ACCOUNT: + dialog = new Dialog(this); + break; + default: + dialog = null; + } + + return dialog; + } + /* Scans device for email addresses and adds them as suggestions */