title: How to save text or numbers to strings and make them counting points on a button click?
body: <p>I know this question has been asked before but in my case it looks different. I have a TextView which has decimal numbers, these numbers changes every time. Below it I have a button, and when I click it, it should take the decimal number in the textview and add as points.</p>
  
  <p>This is what I mean: the textview sometimes displays 0.3, if I click the button it should take this 0.3 and add it to points, if the textview is showing 0.8, the button should add that 0.8 to the points and the points accumulate. The following is what I have tried:</p>
  
  <p>I have <code>MainActivity.class</code> and with this code in <code>onClick listener</code> of the button:</p>
  
  <pre><code>String getgPoints = (String)points.getText();
  data.edit().putFloat("count", parseFloat(getPoints(preview.this) + getgPoints)).apply();
  </code></pre>
  
  <p>This is in my button click listener, it works but the problem is this: The points do not add but they are creating something a series of numbers, for example, if the textview is showing 0.3, and when I click the button my coin balance 0.3 at first click, 0.33 at second click, 0.333 at third click, and so on, but I do not want them to behave like that, I want them to add as from 0.3 on first click, 0.6 on second, 0.9 on third, 1.2 on fourth and so on.</p>
  
  <p>So now my question is, how can I correct my code?</p>