Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;
import android.content.SharedPreferences;

import android.preference.PreferenceManager;

import java.util.HashSet;
import java.util.Set;

public class Main {
    public static Set<String> LoadLisPreferences(String key, Context context) {
        SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
        Set<String> value = new HashSet<String>();
        value = sharedPreferences.getStringSet(key, null);
        return value;
    }
}