title: How do I paint over an Imageview?
body: <p>I have an <code>ImageView</code> which I drew four lines. Now  I want the user to be able to draw over the image. How can this be achieved?</p>
  
  <p>On the other solution I saw that we have to add another view, a custom view, this solution is not suited for this scenario.</p>
  
  <pre><code>Bitmap bitmap = Bitmap.createBitmap((int) getWindowManager()
      .getDefaultDisplay().getWidth(), (int) getWindowManager()
      .getDefaultDisplay().getHeight(), Bitmap.Config.ARGB_8888);
  Canvas canvas = new Canvas(bitmap);
  drawingImageView.setImageBitmap(bitmap);
  DisplayMetrics metrics = this.getResources().getDisplayMetrics();
  int x = metrics.widthPixels;
  int y = metrics.heightPixels;
  Paint paint1 = new Paint () ;
  paint1.setStrokeWidth(10);
  int margin = 100;
  int margin1 = 300;
  int top = 0 + margin;
  int bottom = canvas.getHeight() - margin;
  int left = 0 + margin1;
  int right = canvas.getWidth() - margin1;
  int centerX = x / 2;
  int centerY = y / 2;
  
  canvas.drawLine(centerX, top, centerX, bottom,paint1);
  
  canvas.drawLine(left, centerY, right, centerY,paint1);
  </code></pre>
  
  <p>My layout XML:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:paddingBottom="@dimen/activity_vertical_margin"
      android:paddingLeft="@dimen/activity_horizontal_margin"
      android:paddingRight="@dimen/activity_horizontal_margin"
      android:paddingTop="@dimen/activity_vertical_margin"
      tools:context="com.example.amgsoft_pc.flowermenu.MainActivity"&gt;
  
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:id="@+id/button1"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_alignParentStart="true"
  
          android:id="@+id/button2"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignTop="@+id/button2"
          android:layout_alignParentEnd="true"
          android:id="@+id/button3"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:layout_alignStart="@+id/button1"
          android:id="@+id/button4"
          android:visibility="invisible" /&gt;
      &lt;Button
          android:layout_width="25dp"
          android:layout_height="25dp"
          android:background="@drawable/round_button"
          android:layout_centerVertical="true"
          android:layout_centerHorizontal="true"
          android:id="@+id/circle"  /&gt;
      &lt;ImageView
          android:id="@+id/DrawingImageView"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_centerVertical="true"
          android:layout_centerHorizontal="true"
          android:visibility="invisible"/&gt;
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_below="@+id/button1"
          android:layout_alignParentStart="true"
          android:layout_marginTop="49dp"
          android:id="@+id/button5"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignTop="@+id/button5"
          android:layout_alignStart="@+id/button3"
          android:id="@+id/button6"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_above="@+id/button4"
          android:layout_alignParentStart="true"
          android:layout_marginBottom="58dp"
          android:id="@+id/button7"
          android:visibility="invisible" /&gt;
  
      &lt;Button
          android:text="Button"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_alignBottom="@+id/button7"
          android:layout_alignParentEnd="true"
          android:id="@+id/button8"
          android:visibility="invisible" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>