title: How to move the text view?
body: <p>I have textview and imageview in the frame layout, i want move the text along with finger on the image. </p>
  
  <pre><code>&lt;FrameLayout 
       android:id="@+id/framelayout"
       android:layout_marginTop="30dip"
       android:layout_height="fill_parent" 
       android:layout_width="fill_parent"&gt;
  
       &lt;ImageView 
            android:id="@+id/ImageView01"
            android:layout_height="wrap_content" 
            android:layout_width="wrap_content"/&gt;
  
      &lt;TextView android:id="@+id/text_view"
            android:layout_marginTop="30dip"
            android:layout_width="wrap_content" 
            android:maxLines="20"
            android:scrollbars="vertical"
            android:layout_height="wrap_content"/&gt;
  
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>i try some code but it's not working properly tell me the correct way.</p>
  
  <pre><code>    public boolean onTouch(View v, MotionEvent event) {
  
      float x1 = 0, x2, y1 = 0, y2;
      String direction;
      switch(event.getAction()) {
              case(MotionEvent.ACTION_DOWN):
                  x1 = event.getX();
                  y1 = event.getY();
  
                  break;
              case(MotionEvent.ACTION_UP): {
                  x2 = event.getX();
                  y2 = event.getY();
                  float dx = x2-x1;
                  float dy = y2-y1;
  
                      // Use dx and dy to determine the direction
                  if(Math.abs(dx) &gt; Math.abs(dy)) {
                      if(dx&gt;0) direction = "right";
                      else direction = "left";
                  } else {
                      if(dy&gt;0) direction = "down";
                      else direction = "up";
                  }
              }
  
      }
      return false;
  }
  </code></pre>