save Custom Number Preference - Android android.content

Android examples for android.content:SharedPreferences

Description

save Custom Number Preference

Demo Code

import android.content.Context;
import android.content.SharedPreferences;

public class Main {

  public static void saveCustNoPreference(Context paramContext, String paramString1, String paramString2) {
    SharedPreferences.Editor localEditor = paramContext.getSharedPreferences("com.java2s.clientcustno", 0).edit();
    localEditor.putString(paramString1, paramString2);
    localEditor.commit();//from  w w  w .  ja  v  a  2s.c o  m
  }

}

Related Tutorials