User Cancel - ProgressDialog

by Matthew Patience » Tue, 20 Apr 2010 21:00:43 GMT

Sponsored Links
 I started an indeterminate progress dialog in my onCreate method and
then used ASync to download some info and display it to the user.
After that I dismissed the progressdialog. I don't if anyone else has
experienced this but sometimes the progress dialog is stuck in a loop
and it wont download any info. I can tell because the data arrows wont
move. The only way to cancel this is to click the Home or Search key.

I have never been able to figure out how to debug my applications but
I was rather wondering if this is a common problem or if there is a
simple fix.



User Cancel - ProgressDialog

by polyclefsoftware » Tue, 20 Apr 2010 21:10:53 GMT

 I believe if you use the following method, the back button should
dismiss the progress dialog, without closing the app:


On Apr 20, 8:00am, Matthew Patience <>


Sponsored Links

User Cancel - ProgressDialog

by Matthew Patience » Thu, 22 Apr 2010 01:00:50 GMT

 Works, thank you. The class documentation isn't all there for some
reason. Found a whole bunch of stuff in the code auto-completion in
Eclipse though.

> >

Other Threads

1. ImageView alpha fade to transparent vs. fade to black

Greetings! I have searched this group, read the Common Tasks FAQ,
searched elsewhere, to no avail. Here's what I've got working so far.
Pardon the obvious lack of refactoring. Right now I'm in the "make it
work" phase of things (vs. "make it right" and "make it fast" <grin>):

For starters, we have a basic, tire-kicking type of Android 2.0 app.

Main layout (XML) is a simple LinearLayout with two views, an
ImageView and a WebView. Both use fill_parent for width + height.
ImageView appears on top of WebView, z-order wise. (Done/working.)

An anim(ation) resource for fadeout has also been created, using
accelerate_decelerate_interpolator. All it does is run the alpha down
from 1.0 to 0.0, using config_longAnimTime. (Done/working.)

A given Activity (that also implements AnimationListener) is
initialized with the aforementioned main layout. Thus, once this
particular Activity kicks in, you start off by seeing just the
ImageView. Meanwhile, the WebView is asked to load a particular URI.
When onPageFinished is called, we see if the ImageView is visible.

If ImageView is visible, we create an Animation object, loading our
trusty fadeout via loadAnimation. We set up an animation listener
(keep reading) and kick off the fadeout on our ImageView. (Done/

Once onAnimationEnd is called (remember, we 'set up us the listener')
we set the ImageView's visibility to View.GONE. (Yes, we should very
likely remove the view entirely since we never need it again, but bear
with me - I'm starting off with "make it work" - still finding our way
around town in this regard!) (Done/working.)

Here's the part that is NOT working - or at least it's not working as
expected/desired. The animation is fading the ImageView, but it's
fading to black instead of fading to transparent. We want to fade in
such a way that we reveal the WebView lurking beneath it - our
"desired effect" if you will.

What's happening now is, you see the image fade to black, then the
view is hidden (View.GONE), thus at that point the now-black display
disappears, and POP - there's our web view.

Ah-ha, you (might?) say, use a transparent background color! Then it
fades to transparent and you're all set. Sure enough, that's what I
tried next, adjusting the ImageView's XML to use a background color of
transparent (@android:color/transparent IIRC) and it STILL fades to
black. Thus, I suspect I'm doing something blatantly wrong but can't
put my finger on why.

Clues welcome/appreciated. Thank you!

- JD


2. Must I restart the emulator on code changes?

I'm using Eclipse as my IDE and I can start the emulator and test code
without issue (although it takes FOREVER to start up). I've read that
I should keep the emulator running and retest code changes but, when I
try, I get the following error:

Emulator]emulator: ERROR: the user data image is used by another
emulator. aborting

Any thoughts?


3. How to develop Arabic to English Dictionary in Android

4. Issue Launching Emulator from Command Line

5. stream internet radio

6. Trouble installing from SDK and AVD Manager: access denied unzipping

7. SDK : how can I get result from the dialer ?