title: How to get and set text android?
body: <p>I'm trying to get the text from one android edit text and put it in another, the whole over all goal is to make a temperature converter. It's an assignment from an online course I'm working on which I paid for.</p>
  
  <p>Anyways this my code I'm using in my MainActivity:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      final EditText txt_Input1 = (EditText) findViewById(R.id.txt_Input1);
      Button btnConvert1 = (Button) findViewById(R.id.btnConvertOne);
      final EditText txt_Output1 = (EditText) findViewById(R.id.txt_Output1);
  
      btnConvert1.setOnClickListener( new View.OnClickListener(){
          public void onClick(View view){
              //txt_Output1.setText(txt_Input1.getText().toString());
              //txt_Output1.setText(Integer.parseInt(txt_Input1.getText().toString()));
              userInput = txt_Input1.getText().toString();
              Log.v("TEST", userInput);
          }
      });
  
      EditText txt_Input2 = (EditText) findViewById(R.id.txt_Input2);
      Button btnConvert2 = (Button) findViewById(R.id.btnConvertTwo);
      EditText txt_Output2 = (EditText) findViewById(R.id.txt_Output2);
  
      btnConvert2.setOnClickListener( new View.OnClickListener(){
          public void onClick(View view){
  
          }
      });
  
  }
  </code></pre>
  
  <p>I'm not really sure what I'm doing wrong I've tried it a couple different ways and so far none have helped, I'm not really sure why but if I don't set the edit texts as final it won't let me call them in my btnConvert1 method. Does anyone know how to fix this? I really want to know what I'm doing wrong. Right now if I hit the btnConver1 this is the output I get:</p>
  
  <blockquote>
    <p>01-07 00:56:11.549  26996-26996/application.helloword.tobar.jose.temperatureconverterapp V/TEST﹕ [ 01-07 00:56:11.809   768: 1129 I/AudioService ]
        getStreamVolume 3 index 0</p>
  </blockquote>