Hi,
I am experiencing exactly the same issue as Mihai Fonoage. Have you
solved it?

On 20 Mrz., 13:57, vitvikt <[EMAIL PROTECTED]> wrote:
> Hi!
> I also have problem in my project width dismiss() for ProgressDialog.
> For explain my problem I used Snake as exaple.
> I writeed onProgressClick() and onStopProgress() in Snake.java
> and I call it in update() in SnakeView.java.
> When I call onStopProgress() width mProgressDialog.dismiss();
> I have NullPointerException.
> Can anybody explain me, what is the matter?
> Thank You.
>
> In detail:
> I insert in Snake:
>         ProgressDialog mProgressDialog;
> ---
>     public void onCreate(Bundle icicle) {
>         super.onCreate(icicle);
> ---
>         mSnakeView.ActWW=this;
> ---
>         }
>         public void onProgressClick() {
>                 mProgressDialog=new ProgressDialog(mSnakeView.getContext());
>                 mProgressDialog.show(mSnakeView.getContext(),
>                 null, "Computer things...", true, true);
>         }
>         public void onStopProgress() {
>                 if(mProgressDialog!=null)
>                         mProgressDialog.dismiss();
>         in SnakeView:
>         boolean toCreateProgresDialog=false;
>         boolean WasFinishedProgress=false;
>         public Snake ActWW;
>         int Sch=0;
>    private void initNewGame() {
> ---
> mNextDirection = EAST;//NORTH;
> ---
>         }
>    public void update() {
>         if (mMode == RUNNING) {
>                 Sch++;
>                 if(Sch==5)
>                         toCreateProgresDialog=true;
>                 else if(Sch==10)
>                         {
>                         Sch=0;
>                         WasFinishedProgress=true;
>                         }
>                 if(ActWW!=null)
>                         {
>                         if(toCreateProgresDialog)
>                                 {
>                                 toCreateProgresDialog=false;
>                                 ActWW.onProgressClick();
>                                 }
>                         if(WasFinishedProgress)
>                                 {
>                                 WasFinishedProgress=false;
>                                 ActWW.onStopProgress();
>                                 }
>                 }
> ---
--~--~---------~--~----~------------~-------~--~----~
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 email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to