tag:blogger.com,1999:blog-8214401912480503366.post5362192955249329366..comments2023-08-10T13:35:15.093+02:00Comments on My life with Android :-): My first meeting with the SimpleAdapter widgetGabor Pallerhttp://www.blogger.com/profile/14307475522972458932noreply@blogger.comBlogger37125tag:blogger.com,1999:blog-8214401912480503366.post-17616208096980519542016-09-16T13:32:59.394+02:002016-09-16T13:32:59.394+02:00If you have a problem with notifyDataSetChanged(),...If you have a problem with notifyDataSetChanged(), just delete "SimpleAdapter"<br />in<br />SimpleAdapter notes = new SimpleAdapter<br />new line<br />notes = new SimpleAdapter<br />This is because we have created a new variable in the class<br />private SimpleAdapter countries;<br />And if we create it again in oncreate method, then<br />we will get an error<br />Attempt to invoke virtual method 'void android.widget.SimpleAdapter.notifyDataSetChanged()' on a null object reference<br />Anonymoushttps://www.blogger.com/profile/11405837646511875550noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-16073878403202193092016-03-15T18:25:28.426+01:002016-03-15T18:25:28.426+01:00AWESOME!!!!!!!!!!AWESOME!!!!!!!!!!Anonymoushttps://www.blogger.com/profile/17776467113011399592noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-33446985978416349372013-12-10T10:25:10.186+01:002013-12-10T10:25:10.186+01:00tizen vs. android, may I recommend this forum?
Yo...tizen vs. android, may I recommend <a href="http://www.sfonge.com/forum/forums/smartphone-platforms/tizen" rel="nofollow">this forum?</a><br /><br />Your Tizen-related comments would be welcome there.<br />Gabor Pallerhttps://www.blogger.com/profile/02390936870056951146noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-34045341265635421672013-12-08T09:54:39.033+01:002013-12-08T09:54:39.033+01:00Hi friend, Your blogs are very cooperative and inf...Hi friend, Your blogs are very cooperative and informative. pleasing information benefiting item. This mail is actually the best on this prized topic. "I actually relish to read all the content is dispatched on your blog. It's very simple to read, the content is large, and you’re an educated scribe different most of the blogs. thanks for the post.tizen vs androidhttp://top7mobiles.com/latestmobiles/tizen-os-featuresadvantages-over-android-and-iosnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-76222255904639022972013-06-14T00:30:59.071+02:002013-06-14T00:30:59.071+02:00Thanks a lot...
it helped alot... Thanking u again...Thanks a lot...<br />it helped alot... Thanking u again...Junaid Ullah Nadeemhttps://www.blogger.com/profile/07532390261730812999noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-28477621643133682362012-08-04T08:52:31.754+02:002012-08-04T08:52:31.754+02:00Thanks. I'm reading an article similar to this...Thanks. I'm reading an article similar to this which links to your article. So I thought it is more convenient if I can read another article on this topic.<br /><br />Thanks for helping us. This solved my issue.Banghttp://australia.studyhorror.comnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-51289531389948680012012-01-07T18:36:54.709+01:002012-01-07T18:36:54.709+01:00THANK YOU VERY VERY MUCH! I wasted 6 hours coding ...<b>THANK YOU VERY VERY MUCH!</b> I wasted 6 hours coding trying to get my list to work, finally I saw your information and got it working.<br /><br />I had a small problem with notes.notifyDataSetChanged(); - it didn't seem to post the information to the list from a loop, but got around that pretty quickly.<br /><br />Thank you again!Lachlannoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-66017372760445480152011-12-13T07:05:47.562+01:002011-12-13T07:05:47.562+01:00Thanks....Thanks....ishtekhttp://www.techienjoy.comnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-22272445696919513902011-05-25T11:20:58.333+02:002011-05-25T11:20:58.333+02:00Mohammed, of course I don't mind, thanks!Mohammed, of course I don't mind, thanks!Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-55025111651079064292011-05-21T06:42:25.051+02:002011-05-21T06:42:25.051+02:00Thanks a lot for the great article.. very helpful ...Thanks a lot for the great article.. very helpful and explanatory to beginners. Official documentation continue to strike me as useless in most cases.<br /><br />I hope you don't mind me referencing your article in my blog.Mohamed Elkammarhttps://www.blogger.com/profile/16221146119263304736noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-21267308541375607852011-04-21T12:49:40.660+02:002011-04-21T12:49:40.660+02:00Thanx .. that really helped and saved a lot of eff...Thanx .. that really helped and saved a lot of effort of going through the not-working overly complex tutorials. :)Manish Kungwanihttp://manishkungwani.comnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-73084754434697646372011-04-21T10:49:53.730+02:002011-04-21T10:49:53.730+02:00thank, now i can get value from two line item with...thank, now i can get value from two line item with your code. <br /><br />String str;<br /> str=list.get(position).toString();<br /><br />//list.remove(position); //notes.notifyDataSetChanged(); <br /> Toast.makeText(getApplicationContext(), str, Toast.LENGTH_SHORT).show();Khmer Networkhttps://www.blogger.com/profile/15557608222627676172noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-33246541150367167632011-04-21T04:07:18.094+02:002011-04-21T04:07:18.094+02:00Thank for your sample code, it also need to use tw...Thank for your sample code, it also need to use two line item for listview. Can u show me how to get value from selected item with your code? i can get selected value from a single row item listview. but with your code i can't. can u show me ?Khmer Networkhttps://www.blogger.com/profile/15557608222627676172noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-61691173730031229702011-01-23T08:02:36.746+01:002011-01-23T08:02:36.746+01:00This was a useful tutorial on SimpleAdapter.
Simpl...This was a useful tutorial on SimpleAdapter.<br />SimpleAdapter was not as simple as I thought.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-32654966805720474432010-11-23T00:20:27.385+01:002010-11-23T00:20:27.385+01:00Thank you, You saved my time.Thank you, You saved my time.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-61249570856997978012010-10-27T09:00:46.850+02:002010-10-27T09:00:46.850+02:00Anonymous, is multithreading involved somehow? And...Anonymous, is multithreading involved somehow? Android widgets including adapters can only be manipulated from the app's ui thread. There are tricky ways to get multithreading into the picture, e.g. rpc.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-8085989694665749332010-10-27T02:04:52.884+02:002010-10-27T02:04:52.884+02:00Thanks for the advice; actually it dies at the Add...Thanks for the advice; actually it dies at the Add method, so I could not even get to the notifyDataSetChanged() that you mentioned. I plan to switch over using the database method instead of using the resource file option - HTAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-15219054084506292472010-10-25T07:26:00.055+02:002010-10-25T07:26:00.055+02:00Anonymous, many Android adapters have a trick that...Anonymous, many Android adapters have a trick that they don't refresh the widget tree (i.e. the visible elements) until they are instructed to do so. The magic method is notifyDataSetChanged() in android.widget.BaseAdapter (parent class for ArrayAdapter, e.g.) which conveniently has no documentation text in the Android reference (just the method headline). For ArrayAdapter, you also have setNotifyOnChange(). If you invoke when you set up your adapter, notifyDataSetChanged() will be invoked automatically when you add, delete or modify an element. If your widget that the adapter is attached to is already visible and you add a large amount of items then I don't recommend setNotifyOnChange( true ) as it causes visible flicker on screen.<br /><br />This is a less documented part of adapters, I admit.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-55720058068923088492010-10-24T16:12:39.223+02:002010-10-24T16:12:39.223+02:00Great tutorial, thanks. I was wondering if you hav...Great tutorial, thanks. I was wondering if you have tried the android HelloSpinner, it uses an arrayAdapter, and I have a heck of a time adding items into the arrayAdapter. The adapter.Add method does not seem to work based on all the posts out there....your input will be appreciatedAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-16683441272177651302010-06-08T10:04:00.080+02:002010-06-08T10:04:00.080+02:00Anonymous, check this post. Be careful, that examp...Anonymous, <a href="http://mylifewithandroid.blogspot.com/2008/04/custom-widget-adapter-based-on-xml.html" rel="nofollow">check this post.</a> Be careful, that example program was written for pre-1.0 SDK, it needs some updating. The instructions are in the comments of the post.Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-22229670179765526232010-06-07T23:52:18.107+02:002010-06-07T23:52:18.107+02:00hi,
nice tutorial!! saved me lot of time! thx!
but...hi,<br />nice tutorial!! saved me lot of time! thx!<br />but i have one more question: how to pass some attributes to each row? such as bgColor or height?<br />thx!<br />tomAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-89992323969716299692010-03-12T17:20:32.304+01:002010-03-12T17:20:32.304+01:00thanks a lot!!!!!!!!!!
This tutorial has saved my ...thanks a lot!!!!!!!!!!<br />This tutorial has saved my lot of time.<br />Thanks really.dhttps://www.blogger.com/profile/05719587507468787440noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-78363728168978809972010-02-22T21:51:57.120+01:002010-02-22T21:51:57.120+01:00nevermind. erase previous post and this one. thank...nevermind. erase previous post and this one. thank you.myname herehttps://www.blogger.com/profile/09159231695481028823noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-67843647834305184352010-02-22T19:45:44.227+01:002010-02-22T19:45:44.227+01:00This comment has been removed by the author.myname herehttps://www.blogger.com/profile/09159231695481028823noreply@blogger.comtag:blogger.com,1999:blog-8214401912480503366.post-2430797876301975812010-01-21T16:29:47.859+01:002010-01-21T16:29:47.859+01:00Try this:
Test-driving the Android GUITry this:<br /><br /><a href="http://mylifewithandroid.blogspot.com/2008/11/test-driving-android-gui.html" rel="nofollow">Test-driving the Android GUI</a>Gabor Pallerhttps://www.blogger.com/profile/14307475522972458932noreply@blogger.com