title: Problem accessing updated variables within OnTouch
body: <p>I have an OnTouch and a setOnTouchListener that updates varibles which contain screen coord info. The problem is it doesnt seem to ever update them. On line 78, RGB.setText(test); it never changes from 0.0. If i were to move that line and the line above it into the onTouch it updates. any idea what is wrong? Thank you.</p>
  
  <pre><code>package com.evankimia.huskybus;
  </code></pre>
  
  <p>import com.test.huskybus.R;</p>
  
  <p>import android.app.Activity;
  import android.os.Bundle;
  import android.view.MotionEvent;
  import android.view.View;
  import android.view.View.OnTouchListener;
  import android.widget.TextView;</p>
  
  <p>public class HuskyBus extends Activity {</p>
  
  <pre><code>TextView RGB;
  private CampusMap mCampusMap;
  
  private float startX = 0; //track x from one ACTION_MOVE to the next
  private float startY = 0; //track y from one ACTION_MOVE to the next
  float scrollByX = 0; //x amount to scroll by
  float scrollByY = 0; //y amount to scroll by
  
      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState) {
  
  
              super.onCreate(savedInstanceState);
  
  
  
              setContentView(R.layout.main);
  
              RGB = (TextView) findViewById(R.id.coordBox);
  
              mCampusMap = (CampusMap) findViewById(R.id.map);
              mCampusMap.setOnTouchListener(new OnTouchListener() {
  
                                      @Override
                                      public boolean onTouch(View v, MotionEvent event) {
                                              // TODO Auto-generated method stub
  
  
  
                                              switch (event.getAction()) {
  
                      case MotionEvent.ACTION_DOWN:
                              // Remember our initial down event location.
  
                              startX = event.getRawX();
                              startY = event.getRawY();
                              break;
  
                      case MotionEvent.ACTION_MOVE:
                              float x = event.getRawX();
  
                              float y = event.getRawY();
                              // Calculate move update. This will happen many times
                              // during the course of a single movement gesture.
  
                              scrollByX = x - startX; //move update x increment
                              scrollByY = y - startY; //move update y increment
  
                              startX = x; //reset initial values to latest
                              startY = y;
  
  
  
                              mCampusMap.invalidate();
  
                              break;
              }//end switch
                                              return false;
                                      }
                                      ;
  
              }); //end onDraw?
  </code></pre>
  
  <p>String test = "" + scrollByX;
                 RGB.setText(test);</p>
  
  <pre><code>    }
  
   }
  </code></pre>