title: Multiple color/stroke gesture and persist drawing in same GestureOverlayView
body: <p>I have seen many examples of drawing using gesture. My requirement is that, I want to draw <strong>multiple colored and multiple stroked gesture</strong> in same <code>GestureOverlayView</code>. To be more clear, please have a look at below image.</p>
  
  <p><img src="https://i.stack.imgur.com/SfA1Q.png" alt="enter image description here"></p>
  
  <p>If user select different colors and different strokes, drawing should be of respective color/stroke. Now, its drawing different colored and different stroke gestures but <strong>if I select different color or different stroke, previously drawn gesture also takes new color or new stroke</strong>.</p>
  
  <p>One similar question is answered <a href="https://stackoverflow.com/questions/9383026/how-to-persist-the-gestures-of-the-gestureoverlayview/9384343#9384343">here</a> but has same issue.</p>
  
  <p>Kindly suggest.</p>
  
  <pre><code>&lt;android.gesture.GestureOverlayView
         android:id="@+id/signaturePad"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:background="@android:color/white"
         android:eventsInterceptionEnabled="false"
         android:fadeEnabled="false"
         android:fadeOffset="122000"
         android:gestureStrokeLengthThreshold="0.1"
         android:gestureStrokeWidth="6"
         android:gestureStrokeType="multiple"
         android:orientation="vertical" &gt;
  
     &lt;/android.gesture.GestureOverlayView&gt;
  </code></pre>
  
  <p>In java code, changing color code</p>
  
  <pre><code>mGestureOverlayView.setGestureColor(Color.BLUE);
  </code></pre>
  
  <p>Thanks.</p>
  
  <p><strong>Edit :</strong> Thought to implement same with <code>Canvas</code> and got code from <a href="https://github.com/dhaval0122/Sample-Canvas-Android" rel="nofollow noreferrer">here</a>. Its drawing multiple lines but again problem is when I change color/stroke, recently drawn lines also taking new color/stroke. 
  Please suggest whats going wrong here.</p>
  
  <p><strong>Edit (Answer) :</strong> Finally got solution. Have a look at <a href="https://stackoverflow.com/questions/11806208/regarding-android-paint-drawing-color">this</a> link.</p>