title: How to set a border to an imageview
body: <p><img src="https://i.stack.imgur.com/gJ6W8.png" alt="enter image description here"></p>
  
  <p>I am working in an android application and I want to place an <code>ImageView</code> in a particular position in my view. For that I applied the particular code and worked successfully :</p>
  
  <pre><code>ImageView image = (ImageView) findViewById(R.id.imageView1);
  Bitmap bMap = BitmapFactory.decodeResource(getResources(), R.drawable.mrng);
  Matrix mat = new Matrix();
  mat.postRotate(350);
  Bitmap bMapRotate = Bitmap.createBitmap(bMap, 0, 0, bMap.getWidth(),bMap.getHeight(), mat, true);
  image.setImageBitmap(bMapRotate);
  </code></pre>
  
  <p>Now I want to set a border to this image. For that I made a an shape xml and I have set as the background of the image view. </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;solid android:color="#FFFFFF" /&gt;
      &lt;stroke android:width="3dp" android:color="#000000" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>But when I gave the background of the image view the shape it does not give the correct output.please help me.</p>
  
  <p>I do not want a border around the ImageView, but rather border around the rotated image.</p>