Search Results

Search found 6 results on 1 pages for 'pleasewait'.

Page 1/1 | 1 

  • how to pause and stop a changing ImageView

    - by user270811
    hi, i have an ImageView in which the picture switches every 5s, i am trying to add a pause and resume button that can stop and restart the action. i am using a Handler, Runnable, and postDelay() for image switch, and i put the code on onResume. i am thinking about using wait and notify for the pause and resume, but that would mean creating an extra thread. so far for the thread, i have this: class RecipeDisplayThread extends Thread { boolean pleaseWait = false; // This method is called when the thread runs public void run() { while (true) { // Do work // Check if should wait synchronized (this) { while (pleaseWait) { try { wait(); } catch (Exception e) { } } } // Do work } } } and in the main activity's onCreate(): Button pauseButton = (Button) findViewById(R.id.pause); pauseButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { while (true) { synchronized (thread) { thread.pleaseWait = true; } } } }); Button resumeButton = (Button) findViewById(R.id.resume); resumeButton.setOnClickListener(new View.OnClickListener() { public void onClick(View view) { while (true) { // Resume the thread synchronized (thread) { thread.pleaseWait = false; thread.notify(); } } } }); the pause button seems to work, but then after that i can't press any other button, such as the resume button. thanks.

    Read the article

  • html includes in a JSP using IIS/WebLogic

    - by Striker
    I have my IIS 6 server setup to process server side includes, we're also using the WebLogic ISAPI plugin for IIS. I have a simple html file that I'm trying to include in the JSP using the following include: <!-- #include file="/pleaseWait/pleaseWait.html" --> When I use the above line in a JSP I get an error message saying: "pleaseWait is not defined". From an HTML file on the web server it works fine. The include works in the HTML whether I use file or virtual. I can't use the jsp @ include because that's resolved at build time and the HTML file does not exist in the Java project. It's static content so it's on the IIS server. In the past we've change the extension to .jsp and included the images and static content in the .war file....the problem with that is we now have 10 different versions of this code in our apps and not all of them look or function the same. This is an attempt to standardize and centralize the code for this feature across our apps. Any ideas or suggestions?

    Read the article

  • Form.Show() is not showing it's child controls

    - by Refracted Paladin
    I have a form, frmPleaseWait, that has a MarqueeProgressBar and a Label that I want to use when the UI is loading the data in a poorly structured app we have. The problem is that frmPleaseWait.Show() shows the form but not the controls in it. It is just a white rectangle. Now frmPleaseWait.ShowDialog() shows the child controls but doesn't let the UI load it's data. What am I missing? Below is a code snippet from where I am trying this. PleaseWait = new frmPleaseWait(); PleaseWait.Show(this); // Set all available HUD values in HUD Object HUD.LastName = GetCurrentRowVal("LastName").Trim(); HUD.FirstName = GetCurrentRowVal("FirstName").Trim(); HUD.PersonId = Convert.ToInt32(GetCurrentRowVal("PersonID").Trim()); HUD.SSn = GetCurrentRowVal("SSN").Trim(); HUD.MiddleName = GetCurrentRowVal("MiddleName").Trim(); HUD.MasterID = ConnectBLL.BLL.DriInterface.CheckForDriId(HUD.PersonId).ToString(); // This loads numerous UserControls with data shellForm.FormPaint(HUD.PersonId); PleaseWait.Close();

    Read the article

  • How to show/hide UIImageView when I want.

    - by Madness64
    I'm having a little problem with an iPhone app I'm currently developing. When the user touch a button, it calls an IBAction named refreshQuestion, which is supposed to show an image hover the screen to ask the user to wait a moment, then it has to call another function, and finally it has to hide the image. The problem is that the image won't appear. As well as the network activity indicator. Any help? Here is the code : - (IBAction)refreshQuestion:(id)sender{ pleaseWait.hidden = NO; [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [self loadData]; pleaseWait.hidden = YES; [UIApplication sharedApplication].networkActivityIndicatorVisible = NO; }

    Read the article

1