title: Getting an extra line when using persistant data and keymaps. How do I fix it?
body: <p>I'm new to keymaps and persistent storage. For some reason I'm getting an extra line when using a for loop to get a map variable. Everything seems to work right until I have it update the textview and it adds an extra string.</p>
  
  <p>I will post a snippet of my code bellow
  I will also post the screenshot of the textview after I push the button.</p>
  
  <pre><code>static SharedPreferences prefs;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          Context context = this;
  
          prefs = context.getSharedPreferences(PREFS_NAME, MODE_PRIVATE);
  
          SharedPreferences.Editor editor = prefs.edit();
  
          editor.putString("test 01/16/1990 - 12:30AM", "211");
          editor.putString("test 05/26/2017 - 9:50AM", "166");
          editor.commit();
  
  
          setContentView(R.layout.activity_main);
          tv = (TextView) findViewById(R.id.testTextView);
  
   chart = (Button) findViewById(R.id.chartBtn);
          chart.setOnClickListener(new View.OnClickListener() {
  
              @Override
              public void onClick(View v) {
  
                  tv.setText("Testing : \n");
                  Map&lt;String,?&gt; keys = prefs.getAll();
  
                  for(Map.Entry&lt;String, ?&gt; entry : keys.entrySet()){
                      tv.append("\n Dat-Time : " + entry.getKey() + " / Sugars: " + entry.getValue());
                  }
              }
          });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/8EqAg.png" rel="nofollow noreferrer">enter image description here</a></p>