Android SharedPreferences Delete deleteAllPreference(Context context)

Here you can find the source of deleteAllPreference(Context context)

Description

delete All Preference

Declaration

public static void deleteAllPreference(Context context) 

Method Source Code

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

import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor;

import android.preference.PreferenceManager;

public class Main {
    public static void deleteAllPreference(Context context) {
        SharedPreferences pref = PreferenceManager
                .getDefaultSharedPreferences(context);
        Editor edit = pref.edit();//from   ww w  .j a v a  2s  . c o m
        edit.clear();
        edit.commit();
    }
}

Related

  1. clearSharedPreferences(Context context)