SHARE
TWEET

Untitled

a guest Aug 1st, 2011 84 Never
  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. }
RAW Paste Data
Top