Slow Scrolling

by Al » Thu, 12 Mar 2009 07:01:07 GMT

Sponsored Links
 Hi, sometimes when I try to scroll using a scrollview (wrapped around
a textview), there will be no response. I've noticed this in both my
apps and the only common thing between them is the textview in both
apps use Spanned (SpanableStringBuilder to be exact) text. This
happens even when there is no activity on the window and no anr pops
up either.

Any idea what would be the cause?

Slow Scrolling

by AlCapwn » Thu, 12 Mar 2009 07:03:56 GMT

 Whoops, forgot to add this. When the freeze happened, I generated a
bugreport and it says this:

"main" prio=5 tid=3 TIMED_WAIT
  | group="main" sCount=1 dsCount=0 s=0 obj=0x400103e8
  | sysTid=2339 nice=0 sched=0/0 handle=-1096221588
  at java.lang.Object.wait(Native Method)
  - waiting on <0x1b6408> (a android.os.MessageQueue)
  at java.lang.Object.wait(
  at android.os.Looper.loop(
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(
  at dalvik.system.NativeStart.main(Native Method)

Not too sure why it would be wait()ing :s


Sponsored Links

Slow Scrolling

by Romain Guy » Thu, 12 Mar 2009 07:16:43 GMT

 It's waiting for events in the main events queue. That's pretty normal
to see this.

Romain Guy
Android framework engineer

Note: please don't send private questions to me, as I don't have time
to provide private support.  All such questions should be posted on
public forums, where I and others can see and answer them


Slow Scrolling

by AlCapwn » Fri, 13 Mar 2009 02:35:35 GMT

 Is there any way to get around the problem of it being non responsive?
The lack of feedback to the scroll attempt is very noticeable.


Slow Scrolling

by Mariano Kamp » Fri, 13 Mar 2009 06:35:54 GMT

 I vaguely remember a similar problem too. Do you also see the dreaded "You
used the BufferedReader default constructor" (something like that) message?
I had the feeling that it lead to a lot of garbage collections which would
in turn explain the unresponsiveness I suppose.
Btw. I got rid of the Spanneds and now do the actual work (in my case HTML
rendering, more exactly translating html entities to text) ahead of time.


Slow Scrolling

by AlCapwn » Sat, 14 Mar 2009 02:01:48 GMT

 n Mar 12, 10:35pm, Mariano Kamp <> wrote:

I see the message but I don't think that is the problem, I've let the
app run for 10+ mins and in that time, GC was only called about 6
times. Bear in mind, this was with an active connection to a server
and continuous update (the data was coming at a very fast rate) of the
textview with the data from the server. (The server connection runs it
in's own thread.)


Slow Scrolling

by Mariano Kamp » Sat, 14 Mar 2009 03:11:40 GMT

 hen I don't know -
But what sounds strange to me is that you get lots of input (new objects,
some of them possible get discarded very quickly during transformations?
growing the heap?) and still only have a garbage collection every 90

On Fri, Mar 13, 2009 at 7:01 PM, AlCapwn <> wrote:


Other Threads

1. Announcing: The Android Developers Union

Hello, fellow Android devs!

I'm sure many of you, like myself, have been fed up with Google
because of their
lackluster support for the Android market.
In response, I am forming a Union of Android Developers. The demands
are laid out here:
This is the statement of intent:

   We, the members and supporters of the Android Developers Union,
are fed up with the conditions of the Android Market. We are tired of
being treated like sharecroppers on Google's digital plantation! We
have compiled a list of seven demands which Google can implement to
improve the Market. Implementing these demands will absolutely improve
the working conditions for Android developers, thereby improving the
Android ecosystem and giving a better experience to our customers.
   If our demands are not met, we will move our applications to
alternative marketplaces or the web, cease Android development in
favor of other more open platforms, we will dissuade other developers
from developing Android projects, and we will work tirelessly to
counter any of Google's hypocritical claims about Openness in the
  These are our demands! They are simple and they are attainable, so
we hope that Google will do the right thing!

 * Renegotiation of the 32% Google-tax on applications sales
 * Remedy to the Order of Entry Effect
 * Public Bug Tracking
 * Increased Payment Options
 * Codified Rules and a Removal Appeal Process
 * Communication and Engineering Liaison
 * Algorithmic Transparency

Please! Join the mailing list, sign the petition, and make a stink!
We are doing this because we _love Android_ and we want it to thrive,
which it can't
do until we developers and our customers are treated fairly and given
a reasonable
place to sell our wares!

Thanks very much for your attention!.


2. Managing WebView gestures

Hi all!

I'm still in the process of discovering the ins and outs of the
Android SDK, so bear with me here. I'm working with Webviews, and
though I have scourged the web for and answer to my question, I can't
find it.

I'm looking to lock the horizontal scroll of my webview (if possible
locked to the max on the left, if not the default should do), and
implement horizontal fling gestures to switch webviews. From what I've
seen I need to override the standard onTouch methods of the webview,
but how can I implement a horizontal gesture and leave the vertical
scroll on my webview?

For now the code looks like this:


public class HelloWebEDT extends Activity {
    /** Called when the activity is first created. */

        WebView myWebView;

    public void onCreate(Bundle savedInstanceState) {

        myWebView = (WebView) findViewById(;
        String source =
get_page(0);                                               //get_page
is my method that retrieves the source of the page to use in the

                myWebView.loadData(source,"text/html", "utf-8");

//CODE//(couldn't find a code tag)

Relativey simple...

Now I need it to scroll vertically, and fling to get_page(1) when
flung right to left, etc... Any Ideas? Example code greatly
appreciated. Thanx!


3. Handling longpress/longclick in MapActivity.

4. Verify Service is real and not a spoof one.

5. Inserted Email addresses now are associated with Facebook

6. Help Getting the Context

7. Lock status bar