But the reason I am using it is to fill the spinners with the db
values. So after the background thread gets the database into the
device , I want the progress dialog to be dismissed and the spinners
to be updated with the db data values.

On Jul 1, 1:36 pm, Romain Guy <[email protected]> wrote:
> Don't touch views from a background thread :) That's what AsyncTask is for.
>
>
>
>
>
> On Wed, Jul 1, 2009 at 10:34 AM, Georgy<[email protected]> wrote:
>
> > and also I am getting an error that only the original thread that
> > created a view hierarchy can touch its views.
>
> > any idea how to avoid this?
>
> > On Jul 1, 12:44 pm, Georgy <[email protected]> wrote:
> >> You are right, I don't know why I was thinking that further...
>
> >> just one more thing.
>
> >> I started a dialog in the UI and i want it to be dimissed at the end
> >> of that background thread.  In the inner class, how can I access that
> >> dialog to dimiss it? or is there a function to dismiss them all?
>
> >> thanks a lot!
>
> >> On Jul 1, 12:23 pm, Mark Murphy <[email protected]> wrote:
>
> >> > Georgy wrote:
> >> > > In here:
>
> >> > > class downloadfiles extends AsyncTask<Void, String, Void> {
>
> >> > >   �...@override
> >> > >    protected Void doInBackground(Void... params) {
>
> >> > >              downloaddata();   // a function that access the database 
> >> > > and pulls
> >> > > the dumped SQL
> >> > >              Dbadapter db = new Dbadapter(this);  // here I am getting 
> >> > > that the
> >> > > constructor Dbadapter(universitymaps.downloadfiles) is undefined
> >> > > because in the Dbadapter class in takes Context and not downloadfiles
> >> > >              db.open();
>
> >> > If downloadfiles is an inner class of your activity, use
> >> > ActivityName.this instead of this, where ActivityName is the name of
> >> > your activity.
>
> >> > --
> >> > Mark Murphy (a Commons 
> >> > Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> >> > Need Android talent? Ask on HADO!http://wiki.andmob.org/hado
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
> 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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to