title: How to change the radius in drawcircle() by edittext?
body: <p>I want to get a value from edittext and pass it to radius, here is my code</p>
  
  <pre><code>class GetRadius extends Activity {
  private float radius = 0;
  @Override
  public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(activity_main);
  
      final EditText editText= findViewById(R.id.myText);
      Button button=findViewById(R.id.mybutton);
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View view) {
              radius=Float.valueOf(editText.getText().toString());
          }
      });
  }
  public float MyRadius() {
      return radius;
  }
  }
  </code></pre>
  
  <p>and I try to get radius in below class, its a part of a public class</p>
  
  <pre><code>@Override
  protected void onDraw(Canvas canvas){
      super.onDraw(canvas);
      Paint paint=new Paint();
      GetRadius getRadius=new GetRadius();
      float radius=getRadius.MyRadius();
  
      for(Coordinate pt:points){
          paint.setColor(pt.colour);
          canvas.drawCircle(pt.x,pt.y,radius,paint);
      }
  }
  </code></pre>
  
  <p>It shows no bug, but just can't draw the point on view. and if I change radius to a number like 20,12... it will works. I'm not sure what's wrong with it.</p>