7

sharedPreferences help. How do I save an int?

view full story
linux-howto

http://stackoverflow.com – I can't for the life of me seem to figure out how to save an int. All I want to do is save leftCounter into a file and retrieve it whenever I reboot my code. public class SalesTrack extends Activity { byte leftCounter = 0; byte centerCounter = 0; byte rightCounter = 0; int total; int x, y, z; public static final String PREFS = "data"; TextView counterAAL, counterUPG, counterNL, counterTotal; private final String LEFTY = "6"; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sales_track); counter (HowTos)