Hello,

I never use Async task before. I just learn about the content provider
and Thread in Android. Sorry I am stupid about Async task and Thread.
Now I try the global variable.

How are you initializing your database? I use the sample code of
searchable dictionary which talks about content provider.



On Fri, Aug 3, 2012 at 8:43 PM, Justin Anderson <[email protected]> wrote:
>> You can take a static boolean variable globaly (boolean_var = false). and
>> when ur database work finish you do it true.
>
> Global variables are generally a bad idea.
>
> How are you initializing your database?  One thing that I've done before for
> loading data is use an AsyncTask... Initialize your activity in the loading
> state.  Use AsyncTask to initialize your database.  In the onPostExecute()
> method of AsyncTask you can tell your activity to hide the progressbar and
> show the normal view.
>
>
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Fri, Aug 3, 2012 at 6:55 AM, KHEM Sochenda <[email protected]>
> wrote:
>>
>> Hi,
>>
>> Thank you. Do you mean a variable globally in the program? maybe in
>> the String? :)
>>
>> I will try tonight.
>>
>>
>>
>> On Fri, Aug 3, 2012 at 4:12 PM, sudam <[email protected]> wrote:
>> >
>> >  Hi friend,
>> >
>> > You can take a static boolean variable globaly (boolean_var = false).
>> > and
>> > when ur database work finish you do it true.
>> > In a different thread check continouslly by
>> > while(boolean_var){
>> > dilog.dismiss();
>> > }
>> >
>> >
>> > On Friday, 3 August 2012 08:52:21 UTC+5:30, Petit wrote:
>> >>
>> >> Hello All,
>> >>
>> >> I am new to android. I have been learning it few months till now. I am
>> >> trying with Content Provider and thread with sample code of searchable
>> >> dictionary few weeks ago. While loading the database I want to show
>> >> the progress bar instead of main layout. The main layout will display
>> >> only when dictionary finished its loading.
>> >>
>> >> Thanks in advance for your  response.
>> >>
>> >> Regards,
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" 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-developers?hl=en
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" 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-developers?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" 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-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" 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-developers?hl=en

Reply via email to