[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Kevin L
Hi Eric, Same handset and version as you. I've noticed that when there's even the slightest smudge or bit of moisture on the screen, it acts up horrendously. But sometimes my screen appears clean, and I still get weird behavior. I also experience taps that fire off events about 1-2 cm away from

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Peter Eastman
The Nexus One doesn't have a very good touch screen. It wasn't designed for multitouch, by they (only partly successfully) hacked multitouch support into it. I find that I have to be a little careful how I hold the phone. If my hand touches the screen at the edge, that can confuse it and prevent

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 2:21 pm, Peter Eastman wrote: > The Nexus One doesn't have a very good touch screen. Can anyone recommend the phone on the market right now with the best touch screen? I have enough work to do already with my app, without having to worry about whether or not my app is causing bad to

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 2:03 pm, Dianne Hackborn wrote: > Run Pointer Location in DevTools to see the actual events being delivered to > the application as you touch the screen. Where can I find this? Searches not turning up anything, other than a reference to the Emulator. -- You received this message b

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 2:42 pm, Eric wrote: > On Apr 29, 2:03 pm, Dianne Hackborn wrote: > > > Run Pointer Location in DevTools to see the actual events being delivered to > > the application as you touch the screen. > > Where can I find this?  Searches not turning up anything, other than a > reference to

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 2:03 pm, Dianne Hackborn wrote: > Run Pointer Location in DevTools to see the actual events being delivered to > the application as you touch the screen. I installed Pointer Location. I guess I have some bad news. Pointer Location showed that my touch screen was _extremely_ respons

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 3:03 pm, Dianne Hackborn wrote: > On Fri, Apr 29, 2011 at 2:58 PM, Eric wrote: > You will need to be more specific in what situations where you are touching, > expect something to happen, and it is not.  If the platform was just > swallowing touch events at times, well, I think I wou

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
Regarding DevTools, by the way, there's a SecurityException bug in DevTools in 2.3.3 that prevent you from running Development Settings, which is very unfortunate. The bug seems to have been around a while. I suppose I could find the source and fix it myself for my phone... http://code.google.co

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Igor Prilepov
It looks like your app eats up a lot of CPU. Reduce (or remove completely) background processing and list update and check touch screen again. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-dev

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread lbendlin
If the touchscreen on the Nexus One acts up there's a simple short term remedy. Put the device into standby and wake it up again. That seems to recalibrate the screen. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group,

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 3:37 pm, Dianne Hackborn wrote: > On Fri, Apr 29, 2011 at 3:20 PM, Eric wrote: > Ah.  If you are doing an actual data change, the list view needs to rebuild > the list at that point, and likely the touch will be lost.  You really don't > want to be doing a big data update every seco

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 3:37 pm, Dianne Hackborn wrote: > but you don't want to tell the list view that your data set has changed > because > then it needs to throw all of its current views away, retrieve the new data, > and bind that data to new views. I thought the views get recycled? Isn't that what th

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
On Apr 29, 8:25 pm, Mark Murphy wrote: > > We can't really do that.  Many of the screens in the app show market > > depth, and the depth changes update-by-update.  You need to redraw the > > entire list every time. > > ListView is not designed to support setAdapter() being called with > that fre

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Eric
Sorry, I meant to say I'm calling ArrayAdapter.notifyDataSetChanged(), not "ListAdapter.notifyDataSetChanged()". -- 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 uns

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Doug
On Apr 29, 1:20 pm, lbendlin wrote: > If the touchscreen on the Nexus One acts up there's a simple short term > remedy. Put the device into standby and wake it up again. That seems to > recalibrate the screen. My N1 has regular touch screen problems that are resolved by turning the device off and

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
On Apr 29, 10:33 pm, Dianne Hackborn wrote: > On Fri, Apr 29, 2011 at 8:43 PM, Eric wrote: > > Sorry, I meant to say I'm calling ArrayAdapter.notifyDataSetChanged(), > > not "ListAdapter.notifyDataSetChanged()". > > This API tells the list view that the entire data set has changed, so it > need

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
By the way, this Google I/O video on ListView seems to indicate it is perfectly acceptable, and in fact required, that you call notifyDatasetChanged() when anything in your dataset changes (either individual cell content, or data set size). Nothing in this video says you should be iterating throug

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Streets Of Boston
Yes, you're right about that. Calling notifyDataSetChanged on the adapter is the best way to go and you should use it in 99% of cases. However, in some cases rules should be broken. :) A call to notifyDataSetChanged redraws all the children in the ListView and is relatively expensive and you get

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread lbendlin
i think this should say "redraws all the *visible* children in the listview" -- 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 emai

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
On Apr 30, 11:05 pm, Streets Of Boston wrote: > Yes, you're right about that. Calling notifyDataSetChanged on the adapter is > the best way to go and you should use it in 99% of cases. However, in some > cases rules should be broken. :) > A call to notifyDataSetChanged redraws all the children i

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
On Apr 30, 11:05 pm, Streets Of Boston wrote: > A call to notifyDataSetChanged redraws all the children in the ListView and > is relatively expensive and you get the side effects you notice in your > example (touch issues). Nobody has yet explained to me how calling notifyDatasetChanged() relat

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
On Apr 30, 11:29 pm, Dianne Hackborn wrote: > I'm not sure what more to say except that this isn't how > notifyDataSetChanged() is supposed to be used.  It is for relatively > infrequent, significant changes to the underlying data.  The typical case is > when a new query has been done in a datab

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
On Apr 30, 11:39 pm, Romain Guy wrote: > Figuring out which items are visible is pretty easy, you can use > ListView.getFirstVisiblePosition() to know what section of your adapter is > visible (getFirstVisiblePosition() + getChildCount() - 1 gives you the last > visible position.) Ok. So are y

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Eric
On May 1, 12:01 am, Romain Guy wrote: > If you are doing *very* frequent updates (several times per second for > instance, with let's say a progress bar or some sort of animation) you > should indeed modify the Views directly. OK. > Adaptor should have a > > > notifyDatasetChangedAtIndexes(in

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread keyboardr
Chalk one up to the Law of Leaky Abstractions? On Apr 30, 9:19 pm, Eric wrote: > On May 1, 12:01 am, Romain Guy wrote: > > > If you are doing *very* frequent updates (several times per second for > > instance, with let's say a progress bar or some sort of animation) you > > should indeed modify

[android-developers] Re: Flaky Touch Screen on Nexus One

2011-05-02 Thread Nick
That fixes it sometimes. Another way I figured out is if I just smudge the corners of the N1 it goes away sometimes. -- 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.co

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
Run Pointer Location in DevTools to see the actual events being delivered to the application as you touch the screen. On Fri, Apr 29, 2011 at 12:33 PM, Kevin L wrote: > Hi Eric, > > Same handset and version as you. I've noticed that when there's even > the slightest smudge or bit of moisture on

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
Nexus S has a much better touch screen than Nexus 1. It can do I believe 5 distinct fingers pretty cleanly. Xoom has a quite good touch screen -- it can do 10 distinct fingers I believe. The main issue with the N1 is multitouch -- the sensor just can't completely detect two fingers at the same t

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
On Fri, Apr 29, 2011 at 2:58 PM, Eric wrote: > I installed Pointer Location. I guess I have some bad news. Pointer > Location showed that my touch screen was _extremely_ responsive. It > was picking up absolutely every touch I gave it. This means the > hardware looks solid. But I also think

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
On Fri, Apr 29, 2011 at 3:20 PM, Eric wrote: > Let's say the most noticeable one is clicking an item in a list view. > Note that my list view updates itself quite often to display realtime > data. Do I need to do something special to avoid touch events being > lost in the case where my list view

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
On Fri, Apr 29, 2011 at 3:22 PM, Eric wrote: > Regarding DevTools, by the way, there's a SecurityException bug in > DevTools in 2.3.3 that prevent you from running Development Settings, > which is very unfortunate. The bug seems to have been around a > while. I suppose I could find the source a

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Mark Murphy
On Fri, Apr 29, 2011 at 4:20 PM, lbendlin wrote: > If the touchscreen on the Nexus One acts up there's a simple short term > remedy. Put the device into standby and wake it up again. That seems to > recalibrate the screen. That particular problem was a common defect -- I got my Nexus One replaced

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Mark Murphy
> We can't really do that.  Many of the screens in the app show market > depth, and the depth changes update-by-update.  You need to redraw the > entire list every time. ListView is not designed to support setAdapter() being called with that frequency. If that is how you "redraw the entire list ev

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
On Fri, Apr 29, 2011 at 8:14 PM, Eric wrote: > On Apr 29, 3:37 pm, Dianne Hackborn wrote: > > On Fri, Apr 29, 2011 at 3:20 PM, Eric wrote: > > Ah. If you are doing an actual data change, the list view needs to > rebuild > > the list at that point, and likely the touch will be lost. You reall

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-29 Thread Dianne Hackborn
On Fri, Apr 29, 2011 at 8:43 PM, Eric wrote: > Sorry, I meant to say I'm calling ArrayAdapter.notifyDataSetChanged(), > not "ListAdapter.notifyDataSetChanged()". > This API tells the list view that the entire data set has changed, so it needs to reload it and rebuild the items from the new data.

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Dianne Hackborn
Re battery levels -- the batteries on these devices don't simply charge to 100%, they will charge up 100%, then drain down some amount (toward 90%), then charge up again. The Droid's hardware only reports battery level in 10% increments, so you wouldn't see the behavior there. Also some manufactu

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Dianne Hackborn
I'm not sure what more to say except that this isn't how notifyDataSetChanged() is supposed to be used. It is for relatively infrequent, significant changes to the underlying data. The typical case is when a new query has been done in a database and the adapter is being switched to show the data

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Romain Guy
Figuring out which items are visible is pretty easy, you can use ListView.getFirstVisiblePosition() to know what section of your adapter is visible (getFirstVisiblePosition() + getChildCount() - 1 gives you the last visible position.) On Sat, Apr 30, 2011 at 8:35 PM, Eric wrote: > > > On Apr 30,

Re: [android-developers] Re: Flaky Touch Screen on Nexus One

2011-04-30 Thread Romain Guy
notifyDatasetChanged() is used to force ListView to invoke Adapter.getView() again, which may be expensive, depending on what you do in it. ListView does have many optimizations to make notifyDatasetChanged() calls as efficient as possible though. If you are doing *very* frequent updates (several