title: Font size is not saving in SharedPreferences
body: <p>I have taken a sample program from a book that stores the text size and text. when I am running the program again, the text size is being decreased. Can anyone help me out I am new to android</p>
  
  <pre><code> public void onClick(View v) {
  
               //Getting the SharedPreference object
              prefs = getSharedPreferences(prefName, MODE_PRIVATE);
              SharedPreferences.Editor editor = prefs.edit();
  
              // save the values in the EditText view to preferences
              editor.putFloat(FONT_SIZE_KEY, editText.getTextSize());
              editor.putString(TEXT_VALUE_KEY, editText.getText().toString());
  
              // Saves the values
              editor.commit();
  
              //Display file saved message
              Toast.makeText(getBaseContext(), "Font size saved Successfully!", Toast.LENGTH_SHORT).show();
          }
      });
  </code></pre>
  
  <p><strong>// Loading the shared Prefernces object</strong> </p>
  
  <pre><code>SharedPreferences prefs = getSharedPreferences(prefName, MODE_PRIVATE);
  
      // Set the TextView font size to the previously saved values
      float fontSize = prefs.getFloat(FONT_SIZE_KEY, 12);
  
      // init the SeekBar and EditText
      seekBar.setProgress((int)fontSize);
      editText.setText(prefs.getString(TEXT_VALUE_KEY, ""));
      editText.setTextSize(seekBar.getProgress());
  
      seekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){
  
          @Override
          public void onProgressChanged(SeekBar arg0, int progress, boolean arg2) {
              // Change the font size of the EditText
              editText.setTextSize(progress);
          }
  
          @Override
          public void onStartTrackingTouch(SeekBar arg0) {
  
          }
  
          @Override
          public void onStopTrackingTouch(SeekBar arg0) {
  
          }
  
      });
  </code></pre>