title: Moving bitmap on canvas
body: <p>I have an imageView, canvas, and a button..
  when I click the button a bitmap gets drawn on the canvas</p>
  
  <p>I want to move that bitmap using my onTouch ( drag the bitmap to anywhere on the canvas ).</p>
  
  <pre><code>       s.setOnItemClickListener(new OnItemClickListener() {
             public void onItemClick(AdapterView&lt;?&gt; parent,
                     View v, int position, long id) {
              Bitmap workingBitmap = Bitmap.createBitmap(currentBitmap);
              workingBitmap = Bitmap.createBitmap(workingBitmap); 
              Canvas c = new Canvas(workingBitmap);
              brightBitmap = BitmapFactory.decodeResource(getResources(), sIds.mSmileyIds[position], null); 
              brightBitmap = Bitmap.createScaledBitmap(brightBitmap, 100, 100, false);
              chosenSmiley = brightBitmap;
                  if (chosenSmiley != null) {
                      try {
                      c.drawBitmap(chosenSmiley, posX, posY, null);
                  } catch (Exception e) {
                      e.printStackTrace();
                  }
              }
                  iv.setImageBitmap(workingBitmap);
                 }
  
          public boolean onTouchEvent(MotionEvent event) {
              int eventaction = event.getAction();
  
              switch (eventaction) {
                  case MotionEvent.ACTION_DOWN: 
                      // finger touches the screen
                      break;
  
                  case MotionEvent.ACTION_MOVE:
                      // finger moves on the screen
                      lastX = (int) event.getX();
                      lastY = (int) event.getY();
                      Log.e("my xname", lastX + " Coords of lastX");
                      Log.e("my xname", lastY + " Coords of lastY");
                      brightBitmap = Bitmap.createScaledBitmap(brightBitmap, lastX, lastY, false);
                      break;
  
                  case MotionEvent.ACTION_UP:   
                      // finger leaves the screen
                      break;
              }
  
              // tell the system that we handled the event and no further processing is required
              return true; 
          }   
  
         });
  </code></pre>
  
  <p>this is my current code, the bitmap gets created on 0,0 but I can't drag it etc ..</p>