<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/'><id>tag:blogger.com,1999:blog-1193295309527347789.post6447322555034962335..comments</id><updated>2012-02-17T18:55:34.782+08:00</updated><category term='Screen Brightness'/><category term='Activity'/><category term='AbsoluteLayout'/><category term='Google Maps'/><category term='Picture'/><category term='reflection'/><category term='XmlPullParser'/><category term='Notification'/><category term='debugging'/><category term='RadioButton'/><category term='ListActivity'/><category term='MediaStore'/><category term='Google TV'/><category term='ACCESS_NETWORK_STATE'/><category term='Custom Adapter'/><category term='AppEngine'/><category term='Bitmap'/><category term='My Battery Status'/><category term='RadioGroup'/><category term='Announcement'/><category term='SetContentView'/><category term='Programming'/><category term='Speak Up'/><category term='BroadcastReceiver'/><category term='Environment'/><category term='Internal class'/><category term='VIBRATE'/><category term='Ubuntu 9.04'/><category term='WebView'/><category term='AlertDialog'/><category term='Default Fonts'/><category term='Drawing'/><category term='Mobile App Contests'/><category term='GestureDetector'/><category term='Shoot and Learn'/><category term='ACCESS_FINE_LOCATION'/><category term='Android'/><category term='Design Patterns'/><category term='Handler'/><category term='InputFilter'/><category term='Gallery'/><category term='SpeakUp'/><category term='Adobe Air'/><category term='Android Tool'/><category term='Intent'/><category term='TableLayout'/><category term='MediaPlayer'/><category term='TextToSpeech'/><category term='GridView'/><category term='HttpPost'/><category term='RelativeLayout'/><category term='Localization'/><category term='Log Collector'/><category term='Contacts'/><category term='Restart App'/><category term='Google'/><category term='Options Menu'/><category term='Android Video'/><category term='sdcard'/><category term='Android Future'/><category term='Canvas'/><category term='Content Provider'/><category term='App Inventor'/><category term='View Group'/><category term='View'/><category term='LinearLayout'/><category term='IntelliJ'/><category term='Layout'/><category term='RECEIVE_BOOT_COMPLETED'/><category term='StorageState'/><category term='mac'/><category term='Wifi'/><category term='Audio files'/><category term='Hardware'/><category term='EditText'/><category term='ACCESS_COARSE_LOCATION'/><category term='android x86'/><category term='Battery'/><category term='Contact'/><category term='ACCESS_WIFI_STATE'/><title type='text'>Comments on Tutorial For Android: Drawing with Canvas in Android</title><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://www.tutorialforandroid.com/feeds/6447322555034962335/comments/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default?start-index=26&amp;max-results=25'/><author><name>Almond Joseph Mendoza</name><uri>https://profiles.google.com/101518860229446899809</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vu8S-gipxJo/AAAAAAAAAAI/AAAAAAABh4k/wEVj5tsyCvc/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>33</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-1211264231757843980</id><published>2012-02-17T18:53:58.109+08:00</published><updated>2012-02-17T18:53:58.109+08:00</updated><title type='text'>Thanks a lot i have solve my</title><content type='html'>Thanks a lot i have solve my</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1211264231757843980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1211264231757843980'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1329476038109#c1211264231757843980' title=''/><author><name>afnan khan</name><uri>http://www.blogger.com/profile/14931470689884757780</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1420239580'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-1793822236774617612</id><published>2012-01-16T21:41:57.224+08:00</published><updated>2012-01-16T21:41:57.224+08:00</updated><title type='text'>Excellent tutorials. Thanks!</title><content type='html'>Excellent tutorials. Thanks!</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1793822236774617612'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1793822236774617612'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1326721317224#c1793822236774617612' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-599654027'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-1011632364908222674</id><published>2011-11-28T04:45:15.784+08:00</published><updated>2011-11-28T04:45:15.784+08:00</updated><title type='text'>I really appreciate the shedding of light on this....</title><content type='html'>I really appreciate the shedding of light on this. I too am new to the workflow of Android applications, so this really helped out a lot for me to be able to look at how it should be done, and implement the same fundamentals.&lt;br /&gt;&lt;br /&gt;However, I have a couple of things to point out:&lt;br /&gt;&lt;br /&gt;1. With your code, if you just tap on the screen before anything is drawn, it will throw an IndexOutOfRangeException, and cause a force close. You can remedy that by adding a try/catch block to the MouseEvent.ACTION_UP conditions.&lt;br /&gt;&lt;br /&gt;2. If you change the background colour of the DrawingPanel, you are no longer able to draw (no matter the combination of pen/background colours chosen). This, of course, may have something to do with my newness to the API, and not calling the background changing method in the proper area. If you had any ideas on this one, that would be greatly appreciated :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1011632364908222674'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1011632364908222674'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1322426715784#c1011632364908222674' title=''/><author><name>XaeroDegreaz</name><uri>http://www.blogger.com/profile/11835794664151030608</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-704723922'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-759175398130958770</id><published>2011-10-24T18:46:40.813+08:00</published><updated>2011-10-24T18:46:40.813+08:00</updated><title type='text'>Hi All,

I basically want to draw a map on the scr...</title><content type='html'>Hi All,&lt;br /&gt;&lt;br /&gt;I basically want to draw a map on the screen, this will all be done using draw on canvas (this i can do).&lt;br /&gt;&lt;br /&gt;However the problem I am having is my overall map is 1000 x 1000, however I only ever want the user to see 10x10. Then every time the user moves (arrows or touch &amp;amp; drag) the app automatically draws the next bitmap within the 1000 x 1000 sequence until they reach the end.&lt;br /&gt;&lt;br /&gt;I would also like to add a birdseye view where the view is zoomed in filling up 70% of the Android Screen.&lt;br /&gt;&lt;br /&gt;Can anyone point me in the right direction to solve this?&lt;br /&gt;&lt;br /&gt;Thanks</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/759175398130958770'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/759175398130958770'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1319453200813#c759175398130958770' title=''/><author><name>Raj</name><uri>http://www.blogger.com/profile/13284417261160224034</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1603787869'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-763381609732390098</id><published>2011-09-23T05:43:45.079+08:00</published><updated>2011-09-23T05:43:45.079+08:00</updated><title type='text'>For those who want to paint while moving without m...</title><content type='html'>For those who want to paint while moving without making it slow, check this code modification at onTouchEvent. @Rolli, take a look if you didn&amp;#39;t get it working:&lt;br /&gt;&lt;br /&gt;@Override&lt;br /&gt;        public boolean onTouchEvent(MotionEvent event) {&lt;br /&gt;            synchronized (_thread.getSurfaceHolder()) {&lt;br /&gt;             if(event.getAction() == MotionEvent.ACTION_DOWN){  &lt;br /&gt;                   path = new Path();  &lt;br /&gt;                   path.moveTo(event.getX(), event.getY());  &lt;br /&gt;                   path.lineTo(event.getX(), event.getY());  &lt;br /&gt;                 }else if(event.getAction() == MotionEvent.ACTION_MOVE){  &lt;br /&gt;                   path.lineTo(event.getX(), event.getY());&lt;br /&gt;                   if(_graphics.size() &amp;gt; 0) {&lt;br /&gt;                    _graphics.remove(_graphics.size() - 1);&lt;br /&gt;                   }&lt;br /&gt;                   _graphics.add(path);&lt;br /&gt;                 }else if(event.getAction() == MotionEvent.ACTION_UP){  &lt;br /&gt;                   path.lineTo(event.getX(), event.getY());&lt;br /&gt;                   _graphics.remove(_graphics.size() - 1);&lt;br /&gt;                   _graphics.add(path);&lt;br /&gt;                 }  &lt;br /&gt;                 return true; &lt;br /&gt;            }&lt;br /&gt;        }</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/763381609732390098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/763381609732390098'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1316727825079#c763381609732390098' title=''/><author><name>k18</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-819138729'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-5028727183718911526</id><published>2011-09-20T15:06:29.346+08:00</published><updated>2011-09-20T15:06:29.346+08:00</updated><title type='text'>Hi Sir, how do I make the canvas background as an ...</title><content type='html'>Hi Sir, how do I make the canvas background as an image? Thank you very much :)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5028727183718911526'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5028727183718911526'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1316502389346#c5028727183718911526' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-586732551'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-1247137876143211989</id><published>2011-09-05T10:23:20.990+08:00</published><updated>2011-09-05T10:23:20.990+08:00</updated><title type='text'>Excellent post - thanks for spelling out some of t...</title><content type='html'>Excellent post - thanks for spelling out some of the options for Paint and adding this fun bit of functionality.  It got me going quickly on my newest prototype!&lt;br /&gt;&lt;br /&gt;I&amp;#39;ll get working on the rest of your Canvas series shortly.&lt;br /&gt;&lt;br /&gt;-&lt;a href="http://www.projectjourneyman.com/android-income-powerstart-guide" rel="nofollow"&gt;ProjectJourneyman&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1247137876143211989'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/1247137876143211989'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1315189400990#c1247137876143211989' title=''/><author><name>ProjectJourneyman</name><uri>http://www.blogger.com/profile/01891461275549183791</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-344996976'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-6935248053084124942</id><published>2011-06-21T21:37:10.712+08:00</published><updated>2011-06-21T21:37:10.712+08:00</updated><title type='text'>see the undo and redo tutorial</title><content type='html'>see the undo and redo tutorial</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/6935248053084124942'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/6935248053084124942'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1308663430712#c6935248053084124942' title=''/><author><name>Almond</name><uri>http://www.blogger.com/profile/02015638320884611551</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00747598270679181512'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1560579214'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-5971902950183593724</id><published>2011-06-21T21:28:18.652+08:00</published><updated>2011-06-21T21:28:18.652+08:00</updated><title type='text'>HI 
How do i erase or clear the canvas after draw ...</title><content type='html'>HI &lt;br /&gt;How do i erase or clear the canvas after draw the the line</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5971902950183593724'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5971902950183593724'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1308662898652#c5971902950183593724' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-540250908'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-8312952146302144605</id><published>2011-06-21T19:57:01.340+08:00</published><updated>2011-06-21T19:57:01.340+08:00</updated><title type='text'>to create button and listener you should see the u...</title><content type='html'>to create button and listener you should see the updated tutorial, see above, it would use the extended SurfaceView in an xml thus you can use core android stuff</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/8312952146302144605'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/8312952146302144605'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1308657421340#c8312952146302144605' title=''/><author><name>Almond</name><uri>http://www.blogger.com/profile/02015638320884611551</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00747598270679181512'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1560579214'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-3189749670986377006</id><published>2011-06-21T19:54:14.116+08:00</published><updated>2011-06-21T19:54:14.116+08:00</updated><title type='text'>Thanks, Nice tutorial

How can i add a button and ...</title><content type='html'>Thanks, Nice tutorial&lt;br /&gt;&lt;br /&gt;How can i add a button and listener to it?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/3189749670986377006'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/3189749670986377006'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1308657254116#c3189749670986377006' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-540250908'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-2966931667412692579</id><published>2011-05-28T11:33:08.363+08:00</published><updated>2011-05-28T11:33:08.363+08:00</updated><title type='text'>Anybody know why this code crashes onResume? Works...</title><content type='html'>Anybody know why this code crashes onResume? Works fine until you back out and try to reopen</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/2966931667412692579'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/2966931667412692579'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1306553588363#c2966931667412692579' title=''/><author><name>Ryan</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-265795812'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-2622647102597025353</id><published>2011-05-10T13:56:01.630+08:00</published><updated>2011-05-10T13:56:01.630+08:00</updated><title type='text'>This is using view only , define this activity  in...</title><content type='html'>This is using view only , define this activity  in your manifest &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;public class DrawingActivity extends Activity {&lt;br /&gt; private ArrayList _graphics = new ArrayList();&lt;br /&gt; private Paint mPaint;&lt;br /&gt; Handler myHandler = new Handler() {&lt;br /&gt;&lt;br /&gt;  public void handleMessage(android.os.Message msg) {&lt;br /&gt;   myview.invalidate();&lt;br /&gt;&lt;br /&gt;  };&lt;br /&gt; };&lt;br /&gt; Myview myview;&lt;br /&gt;&lt;br /&gt; @Override&lt;br /&gt; protected void onCreate(Bundle savedInstanceState) {&lt;br /&gt;  super.onCreate(savedInstanceState);&lt;br /&gt;  // setContentView(new DrawingPanel(this));&lt;br /&gt;  mPaint = new Paint();&lt;br /&gt;  mPaint.setDither(true);&lt;br /&gt;  mPaint.setColor(0xFFFFFF00);&lt;br /&gt;  mPaint.setStyle(Paint.Style.STROKE);&lt;br /&gt;  mPaint.setStrokeJoin(Paint.Join.ROUND);&lt;br /&gt;  mPaint.setStrokeCap(Paint.Cap.ROUND);&lt;br /&gt;  mPaint.setStrokeWidth(3);&lt;br /&gt;  myview = new Myview(this);&lt;br /&gt;  myview.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,&lt;br /&gt;    LayoutParams.FILL_PARENT));&lt;br /&gt;  setContentView(myview);&lt;br /&gt;  myHandler = new Handler();&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt; class Myview extends View {&lt;br /&gt;&lt;br /&gt;  public Myview(Context context) {&lt;br /&gt;   super(context);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  Path path;&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  public boolean onTouchEvent(MotionEvent event) {&lt;br /&gt;   if (event.getAction() == MotionEvent.ACTION_DOWN) {&lt;br /&gt;    path = new Path();&lt;br /&gt;    path.moveTo(event.getX(), event.getY());&lt;br /&gt;    path.lineTo(event.getX(), event.getY());&lt;br /&gt;    _graphics.add(path);&lt;br /&gt;   } else if (event.getAction() == MotionEvent.ACTION_MOVE) {&lt;br /&gt;    path.lineTo(event.getX(), event.getY());&lt;br /&gt;   } else if (event.getAction() == MotionEvent.ACTION_UP) {&lt;br /&gt;    path.lineTo(event.getX(), event.getY());&lt;br /&gt;   }&lt;br /&gt;   invalidate();&lt;br /&gt;   return true;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  @Override&lt;br /&gt;  protected void onDraw(Canvas canvas) {&lt;br /&gt;   for (Path path : _graphics) {&lt;br /&gt;    // canvas.drawPoint(graphic.x, graphic.y, mPaint);&lt;br /&gt;    canvas.drawPath(path, mPaint);&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;}</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/2622647102597025353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/2622647102597025353'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1305006961630#c2622647102597025353' title=''/><author><name>midlet</name><uri>http://www.blogger.com/profile/12428658381483367733</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-2018189688'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-8726108302220337566</id><published>2011-05-07T11:54:53.768+08:00</published><updated>2011-05-07T11:54:53.768+08:00</updated><title type='text'>Thanks for the tip android that&amp;#39;s what I neede...</title><content type='html'>Thanks for the tip android that&amp;#39;s what I needed to speed up my app.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/8726108302220337566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/8726108302220337566'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1304740493768#c8726108302220337566' title=''/><author><name>justin</name><uri>http://www.blogger.com/profile/14068690056265229073</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-416271337'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-815312211448784936</id><published>2011-04-30T13:58:01.370+08:00</published><updated>2011-04-30T13:58:01.370+08:00</updated><title type='text'>Gread Post. I also have a android canvas example. ...</title><content type='html'>Gread Post. I also have a android canvas example. Mine is to draw a bitmap from image. Share with u:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://android.jmsliu.com/199/android-canvas-example.html" rel="nofollow"&gt;Android Canvas Example&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/815312211448784936'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/815312211448784936'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1304143081370#c815312211448784936' title=''/><author><name>Lion</name><uri>http://www.blogger.com/profile/14928405423451834506</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1781758501'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-7737295677764664062</id><published>2011-02-17T13:21:50.792+08:00</published><updated>2011-02-17T13:21:50.792+08:00</updated><title type='text'>Thanks, great tutorial. iam trying save the path b...</title><content type='html'>Thanks, great tutorial. iam trying save the path but i couldnt. how to handle change orientation, when we change orientation i want to draw same path again. how can i achieve this&lt;br /&gt;&lt;br /&gt;thanks in advance</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/7737295677764664062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/7737295677764664062'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1297920110792#c7737295677764664062' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1688107739'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-3442527640342613499</id><published>2011-01-21T21:48:40.691+08:00</published><updated>2011-01-21T21:48:40.691+08:00</updated><title type='text'>As i was trying to play around with Android graphi...</title><content type='html'>As i was trying to play around with Android graphics, i got this reference. Then i created the AndroidPaint freeware app. Please have a look at it at &lt;a href="http://som-itsolutions.blogspot.com/2010/12/freeware-android-paint.html" rel="nofollow"&gt;AndroidPaint&lt;/a&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/3442527640342613499'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/3442527640342613499'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1295617720691#c3442527640342613499' title=''/><author><name>Som</name><uri>http://www.blogger.com/profile/09519633424407534012</uri><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='24' height='32' src='http://2.bp.blogspot.com/_PnYnrngiRvA/SexeojTFOyI/AAAAAAAAB_Q/0mAYZ6bRmRc/S220/Picture+006.jpg'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-223366451'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-500459415034717156</id><published>2010-12-06T19:26:24.564+08:00</published><updated>2010-12-06T19:26:24.564+08:00</updated><title type='text'>The preview of the line u draw/drawing are part of...</title><content type='html'>The preview of the line u draw/drawing are part of the drawing in canvas series, i had already prepared all the codes, just dont have time right now to blog about it but ill commit ill do it within this week, so stay posted ;-)</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/500459415034717156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/500459415034717156'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1291634784564#c500459415034717156' title=''/><author><name>Almond</name><uri>http://www.blogger.com/profile/02015638320884611551</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00747598270679181512'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1560579214'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-5326040028896300514</id><published>2010-12-06T18:51:08.130+08:00</published><updated>2010-12-06T18:51:08.130+08:00</updated><title type='text'>There is a problem... the path is shown only when ...</title><content type='html'>There is a problem... the path is shown only when we leave the touch from the screen. It should be shown along the finger moving on screen. Other wise we would have no idea from where the lines are originating if we have to draw something continuously. It will just be a wild guess.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5326040028896300514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5326040028896300514'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1291632668130#c5326040028896300514' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-894836896'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-6243173803310273475</id><published>2010-12-05T16:10:38.742+08:00</published><updated>2010-12-05T16:10:38.742+08:00</updated><title type='text'>@anonymous if you have been following the drawing ...</title><content type='html'>@anonymous if you have been following the drawing in android series the last one is one http://www.tutorialforandroid.com/2010/11/drawing-with-canvas-in-android-saving.html, on the first code block you can insert something like isDrawing or hasDrawn boolean variable (before the try catch, inside the while) on where the paths would only be drawn when an event is trigger, which would make the whole experience smooth.</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/6243173803310273475'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/6243173803310273475'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1291536638742#c6243173803310273475' title=''/><author><name>Almond</name><uri>http://www.blogger.com/profile/02015638320884611551</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00747598270679181512'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1560579214'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-9018705520331654988</id><published>2010-12-05T16:01:42.498+08:00</published><updated>2010-12-05T16:01:42.498+08:00</updated><title type='text'>andrea: I attempted to do this but in a different ...</title><content type='html'>andrea: I attempted to do this but in a different way. at the end of my onDraw method, i cleared the array (_graphics), but for some reason I cannot draw anything</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/9018705520331654988'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/9018705520331654988'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1291536102498#c9018705520331654988' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1934741019'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-7020114263638288454</id><published>2010-11-18T06:03:49.069+08:00</published><updated>2010-11-18T06:03:49.069+08:00</updated><title type='text'>i think it loses performance because at every onDr...</title><content type='html'>i think it loses performance because at every onDraw all the old paths are redrawn. i tried with this:&lt;br /&gt;if(_graphics.size() &amp;gt;= 1)&lt;br /&gt; canvas.drawPath(_graphics.get(_graphics.size()-1), mPaint);&lt;br /&gt;&lt;br /&gt;and it keeps smooth.&lt;br /&gt;&lt;br /&gt;andrea</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/7020114263638288454'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/7020114263638288454'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1290031429069#c7020114263638288454' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1466604958'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-4245975550634267219</id><published>2010-09-02T04:01:24.226+08:00</published><updated>2010-09-02T04:01:24.226+08:00</updated><title type='text'>Thank you Almond and Zingo, this is most helpfull....</title><content type='html'>Thank you Almond and Zingo, this is most helpfull.&lt;br /&gt;&lt;br /&gt;I to change position of object. I set new position to my rectangle when user &amp;quot;drags it&amp;quot;.&lt;br /&gt;&lt;br /&gt;However for some reason, I can see all old positions of retangle.&lt;br /&gt;&lt;br /&gt;How could I show only current position?</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/4245975550634267219'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/4245975550634267219'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1283371284226#c4245975550634267219' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-381995511'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-5328119776669707148</id><published>2010-08-09T21:43:42.314+08:00</published><updated>2010-08-09T21:43:42.314+08:00</updated><title type='text'>Can&amp;#39;t get this to work at all. My screen stays...</title><content type='html'>Can&amp;#39;t get this to work at all. My screen stays black with nothing ever changing, even though I do c.drawARGB(255, 255, 255, 255); in onDraw().</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5328119776669707148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/5328119776669707148'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1281361422314#c5328119776669707148' title=''/><author><name>Anonymous</name><email>noreply@blogger.com</email><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img1.blogblog.com/img/blank.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-351478500'/></entry><entry><id>tag:blogger.com,1999:blog-1193295309527347789.post-3665201154505436589</id><published>2010-05-31T22:59:00.055+08:00</published><updated>2010-05-31T22:59:00.055+08:00</updated><title type='text'>There are a lot of ways to delete or reset the can...</title><content type='html'>There are a lot of ways to delete or reset the canvas but the reset is kinda not directly clear it. If your canvas came with bitmap, you could recycle the bitmap and redraw the bitmap. If you canvas is purely a background color, then you could just drawColor on your canvas.  Hope this link helps http://stackoverflow.com/questions/2423327/android-view-ondraw-always-has-a-clean-canvas</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/3665201154505436589'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1193295309527347789/6447322555034962335/comments/default/3665201154505436589'/><link rel='alternate' type='text/html' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html?showComment=1275317940055#c3665201154505436589' title=''/><author><name>Almond</name><uri>http://www.blogger.com/profile/02015638320884611551</uri><email>noreply@blogger.com</email><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='OpenSocialUserId' value='00747598270679181512'/><gd:image xmlns:gd='http://schemas.google.com/g/2005' rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:in-reply-to xmlns:thr='http://purl.org/syndication/thread/1.0' href='http://www.tutorialforandroid.com/2009/06/drawing-with-canvas-in-android.html' ref='tag:blogger.com,1999:blog-1193295309527347789.post-6447322555034962335' source='http://www.blogger.com/feeds/1193295309527347789/posts/default/6447322555034962335' type='text/html'/><gd:extendedProperty xmlns:gd='http://schemas.google.com/g/2005' name='blogger.itemClass' value='pid-1560579214'/></entry></feed>
