Mark has a level of expertise in Android, including UI design, that is very hard to match. You will be better off if you take everything he writes, whether in his books or in his posts, very seriously, no matter how much it hurts.
Having worked in the mobile software industry since about 1998 myself, I have to agree 100% with Mark: you must be doing something wrong if you think you need hundreds of checkboxes in one activity. This would be irritating enough to the user on a desktop, but it will be much, MUCH more irritating on a phone or even a tablet. Find a way to reduce the number of checkboxes by means of a preceding question, even if it is something as crude as asking if the checked item is spelled with letters 'A' through 'F' etc. Your users will curse you if you force hundreds of checkboxes on them all at once. On Aug 19, 4:35 am, Snowak <psno...@gmail.com> wrote: > What a wonderful answer. It's a great idea to answer everything with > "you don't know what you're doing" and tell me to do it using worst > possible method. Yeah, let's freeze the UI thread. It's gonna be cool. > > On 17 Sie, 23:17, Mark Murphy <mmur...@commonsware.com> wrote: > > > On Wed, Aug 17, 2011 at 12:44 PM, Snowak <psno...@gmail.com> wrote: > > > I have hundreds of CheckBox widgets in my layout > > > That is unlikely to be a good idea. > > > > Obviously such heavy work should be done in separate thread, > > > Not really. > > > > The only thing that this thread actually can do is looping through the > > > list and posting the Runnable for every found checkbox. The problem is > > > that all those Runnables arrive in the UI thread almost at the same > > > time, thus they're all executed at once... The application behaves > > > exactly like I would run the above code in the UI thread - everything > > > freezes. A possible solution is sleeping for some miliseconds after > > > each checkbox so the Runnable can be executed and the UI will have > > > time to process the events... but it's more like a hack. > > > > How can I solve this problem? > > > Redesign your UI to not have "hundreds of CheckBox widgets" at once. > > Or, update them on the main application thread and hope for the best. > > > -- > > Mark Murphy (a Commons > > Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy > > > _Android Programming Tutorials_ Version 3.9 Available! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en