// Path: src/main/java/it/eternitywall/eternitywall/Preferences.java
// public class Preferences {
// 
//     public static final String NODES      = "nodes";
//     public static final String PASSPHRASE = "passphrase";
//     public static final String PIN        = "pin";
//     public static final String EMAIL      = "email";
//     public static final String CHK_ONE    = "ckone";
//     public static final String CHK_TWO    = "cktwo";
//     public static final String DONATION   = "donation";
//     public static final String TO_NOTIFY  = "tonotify";
//     public static final String ALIAS_NAME = "aliasname";
// }


import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.common.net.InetAddresses;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import it.eternitywall.eternitywall.Preferences;
import it.eternitywall.eternitywall.R;
package it.eternitywall.eternitywall.dialogfragments;





/**
 * Created by Riccardo Casatta @RCasatta on 18/12/15.
 */
public class PersonalNodeDialogFragment extends DialogFragment {
    private static final String TAG = "PersonalNodeDlg";

    private EditText txtNode;
    private ListView lstNodes;
    private TextView advise;
    private View view;

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        view = getActivity().getLayoutInflater().inflate(R.layout.dlg_personalnodes, null);

        lstNodes = (ListView) view.findViewById(R.id.lstNodes);
        txtNode = (EditText) view.findViewById(R.id.txtNode);
        advise = (TextView) view.findViewById(R.id.advise);


        final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getActivity());
// Path: src/main/java/it/eternitywall/eternitywall/Preferences.java
// public class Preferences {
// 
//     public static final String NODES      = "nodes";
//     public static final String PASSPHRASE = "passphrase";
//     public static final String PIN        = "pin";
//     public static final String EMAIL      = "email";
//     public static final String CHK_ONE    = "ckone";
//     public static final String CHK_TWO    = "cktwo";
//     public static final String DONATION   = "donation";
//     public static final String TO_NOTIFY  = "tonotify";
//     public static final String ALIAS_NAME = "aliasname";
// }


// Path: src/main/java/it/eternitywall/eternitywall/dialogfragments/PersonalNodeDialogFragment.java
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.support.annotation.Nullable;
import android.support.v4.app.DialogFragment;
import android.support.v7.app.AlertDialog;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.TextView;
import android.widget.Toast;
import com.google.common.net.InetAddresses;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Set;
import it.eternitywall.eternitywall.Preferences;
import it.eternitywall.eternitywall.R;

package it.eternitywall.eternitywall.dialogfragments;





/**
 * Created by Riccardo Casatta @RCasatta on 18/12/15.
 */
public class PersonalNodeDialogFragment extends DialogFragment {
    private static final String TAG = "PersonalNodeDlg";

    private EditText txtNode;
    private ListView lstNodes;
    private TextView advise;
    private View view;

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        view = getActivity().getLayoutInflater().inflate(R.layout.dlg_personalnodes, null);

        lstNodes = (ListView) view.findViewById(R.id.lstNodes);
        txtNode = (EditText) view.findViewById(R.id.txtNode);
        advise = (TextView) view.findViewById(R.id.advise);


        final SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(getActivity());
        final Set<String> stringSet = sharedPref.getStringSet(Preferences.NODES, new HashSet<String>());