[android-developers] Re: ProgressDialog's dismiss() method throwing IllegalArgumentException

2008-06-02 Thread BJJV

Hello,

I ran into the exact same exception (IllegalArgumentException). I
realized I should not call show() and dismiss() within the same
thread. While the original problem did get an issue even when calling
these in different threads I am afraid I cannot contribute to a
solution directly, but it might help some to look at what worked for
me (with M5 RC15 Windows).

public class Configure extends Activity {

//...
protected ProgressDialog pdVerification;

// listeners
protected OnClickListener bSaveListener = new OnClickListener()
{
public void onClick(View v)
{

pdVerification = 
ProgressDialog.show(Configure.this,null,
Please wait while we are 
verifying your input...,
true);
new Thread() {
public void run() {
store.storeConfig(

etUserId.getText().toString(),

etPassword.getText().toString(),
gcal_url,

Double.parseDouble(etInterProb.getText().toString()));

pdVerification.dismiss();
}
}.start();


}
};

Cheers,
Ben
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: ProgressDialog's dismiss() method throwing IllegalArgumentException

2008-06-02 Thread Romain Guy

You can call these methods from the same thread but you cannot call
dismiss() before the ProgressDialog is shown.

On Mon, Jun 2, 2008 at 3:47 AM, BJJV [EMAIL PROTECTED] wrote:

 Hello,

 I ran into the exact same exception (IllegalArgumentException). I
 realized I should not call show() and dismiss() within the same
 thread. While the original problem did get an issue even when calling
 these in different threads I am afraid I cannot contribute to a
 solution directly, but it might help some to look at what worked for
 me (with M5 RC15 Windows).

 public class Configure extends Activity {

//...
protected ProgressDialog pdVerification;

// listeners
protected OnClickListener bSaveListener = new OnClickListener()
{
public void onClick(View v)
{

pdVerification = 
 ProgressDialog.show(Configure.this,null,
Please wait while we are 
 verifying your input...,
 true);
new Thread() {
public void run() {
store.storeConfig(

 etUserId.getText().toString(),

 etPassword.getText().toString(),
gcal_url,

 Double.parseDouble(etInterProb.getText().toString()));

pdVerification.dismiss();
}
}.start();


}
};

 Cheers,
 Ben
 




-- 
Romain Guy
www.curious-creature.org

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: ProgressDialog's dismiss() method throwing IllegalArgumentException

2008-05-28 Thread roland

Hi guys,

I have met the same problem. Is there anyone get the new SDK which is
released for the Round 2 of ADC? I would like to know if this bug is
resolved in the new SDK.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: ProgressDialog's dismiss() method throwing IllegalArgumentException

2008-05-28 Thread roland

Hi guys,

I have met the same problem. Is there anyone get the new SDK which is
released for the Round 2 of ADC? I would like to know if this bug is
resolved in the new SDK.
--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Re: ProgressDialog's dismiss() method throwing IllegalArgumentException

2008-05-13 Thread Mihai Fonoage

Hi goro,

I didn't solve the problem. I do believe this is a bug (or feature)
of the m5 version of the sdk.

Mihai Fonoage

On May 12, 1:33 pm, goro [EMAIL PROTECTED] wrote:
 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
-~--~~~~--~~--~--~---



[android-developers] Re: ProgressDialog's dismiss() method throwing IllegalArgumentException

2008-05-12 Thread goro

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
-~--~~~~--~~--~--~---