Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Aug 1st, 2011  |  syntax: Java  |  size: 0.59 KB  |  views: 77  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. public class PreferenceIO {
  2.  
  3.                 //The GlobalVars class contains static variables so that they are easily used between different parts of the application
  4.  
  5.         public static int getLineColor(Context context) {
  6.                 SharedPreferences prefData = context.getSharedPreferences(GlobalVars.prefsFile, 0);
  7.                 return Color.parseColor(prefData.getString("lineColor", "#ff000000"));
  8.         }
  9.  
  10.         public static int getBackgroundColor(Context context) {
  11.                 SharedPreferences prefData = context.getSharedPreferences(GlobalVars.prefsFile, 0);
  12.                 return Color.parseColor(prefData.getString("backgroundColor", "#ffffffff"));
  13.         }
  14. }