Java tutorial
//package com.java2s; import android.content.Context; import android.preference.PreferenceManager; public class Main { public static String getGapSize(Context context) { return PreferenceManager.getDefaultSharedPreferences(context).getString("gap", "medium"); } }