title: Android Studio ThermoCalc Fahrenheit to Celsius vise versa
body: <p>I am currently programming in Android Studio creating a "ThermoCalc". Basically I need to covert Fahrenheit to Celsius and vise versa. My issue is my calculations are coming out the same and there is some error in my coding, maybe something where it shouldn't be? Hope someone can help. I am new to coding and slowly learning. Any feedback is appreciated. Thank you</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
  
      final EditText etTemp = (EditText) findViewById(R.id.txtTemperature);
      final TextView tvOutput = (TextView) findViewById(R.id.lblOutput);
      final RadioButton radFahToCelLogic = (RadioButton) findViewById(R.id.radFahToCel);
      final RadioButton radCelToFahLogic = (RadioButton) findViewById(R.id.radCelToFah);
  
      Button btnConvertLogic = (Button) findViewById(R.id.btnConvert);
      btnConvertLogic.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              double dblFahrenheit = 0;
              double dblCelcius = (5.0/9) * (dblFahrenheit -32);
              double dblConvertedTemp = 0;
              double dblFahConversion;
  
              // format
              DecimalFormat dfTenth = new DecimalFormat("#.#");
  
  
              if (radFahToCelLogic.isChecked())
              {
                  if (dblFahrenheit &lt;= 212)
                  {
                      dblConvertedTemp = (5.0/9.0) * (dblFahrenheit - 32);
                      tvOutput.setText (dfTenth.format(dblConvertedTemp));
                  }
              }
  
          }
      });
  </code></pre>
  
  <p>I believe the issue has something to do with my dblFahrenheit being set to "0". </p>
  
  <p>So basically in my emulator with my app running, I have one EditText widget which is where you input the temperature, a TextView widget to display output, and two Radio Buttons located in a RadioGroup.</p>
  
  <p>In my if statement I am checking to see if the inputted temperature is equal to or less than 212. If it is then I need to convert my inputted temperature from Fahrenheit to Celsius. </p>
  
  <p>When running my app, no matter what number I put in the EditText(Temperature), the answer is always "17.8". </p>