title: Android add flag on button click
body: <p>I have a button and I want when I click on it the flag.png image gets created and I place it anywhere on the canvas</p>
  
  <p>this is my flag button code</p>
  
  <pre><code>        // the flag button
      Button flag = (Button) findViewById(R.id.btnFlag1);
      flag.setOnClickListener(new View.OnClickListener() {
  
          public void onClick(View v) {
          flag(R.drawable.flag1);
          }
          });
  </code></pre>
  
  <p>and this is my function</p>
  
  <pre><code>public void flag(int resourceID) {
      Bitmap flagBitmap = BitmapFactory.decodeResource(
              getResources(), resourceID);
      Canvas c = new Canvas(flagBitmap);
      c.drawBitmap(flagBitmap, null, null);
  }
  </code></pre>
  
  <p>nothing happens atm .. </p>
  
  <p>the flags are circle and I have them as buttons, and what I want is them to be added when each button is clicked its flag is inserted and I can put it where I want</p>
  
  <p>Like a smiley on any photo editing app</p>