Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8222505
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:18:19+00:00 2026-06-07T14:18:19+00:00

here is the code, currently the progressdialog is shown if user click the button,

  • 0

here is the code, currently the progressdialog is shown if user click the button, and the ‘ring’ is not spinning. but if i paste the progreedialog’s code under onCreate, the ‘ring’ will spin once the screen is loaded. help me find where went wrong..

StaffChoice class:

   public class StaffChoice extends Activity {

    @Override
protected void onCreate(Bundle savedInstanceState)
{                   
    super.onCreate(savedInstanceState);
    setContentView(R.layout.staffchoices);
}

public void onClickCategory(final View view)
{       
    final ProgressDialog progress=ProgressDialog.show(this, "Please wait", "Loading ...", true);

    new Thread()
    {
        public void run()
        {               
            Intent intent = new Intent(view.getContext(), Category.class);
            startActivity(intent);
            progress.dismiss();                     
        }
    }.start();
}
}

onCreate in Category class:

super.onCreate(savedInstanceState);
        setContentView(R.layout.category);
        final ListView lvCategory = (ListView) findViewById(R.id.lvCategory);

        SoapObject Request = new SoapObject (NAMESPACE, METHOD_NAME);
        SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);

        soapEnvelope.dotNet = true;
        soapEnvelope.setOutputSoapObject(Request);

        AndroidHttpTransport aht = new AndroidHttpTransport(URL);

        try
        {
            aht.call(SOAP_ACTION, soapEnvelope);
            SoapObject resultString = (SoapObject) soapEnvelope.getResponse();

            final String[] strCategory = new String[resultString.getPropertyCount()];

            for(int i =0; i<resultString.getPropertyCount(); i++)
            {
                SoapObject array = (SoapObject) resultString .getProperty(i);
                strCategory[i] = array.getProperty(0).toString();   //get category
            }
            ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, strCategory);
            lvCategory.setAdapter(adapter);

            lvCategory.setOnItemClickListener(new OnItemClickListener(){
                @Override
                public void onItemClick(AdapterView<?> arg0, final View arg1, int arg2, long arg3) {                    
                        Intent intent = new Intent(arg1.getContext(), CategoryGames.class);
                        startActivity(intent);
                }               
            });
        }

        catch(Exception e)
        {               
            String[] items = { "No Internet Connection, Please try again" };            
            ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.R.layout.simple_list_item_1, items);
            lvCategory.setAdapter(adapter);
        }   
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T14:18:21+00:00Added an answer on June 7, 2026 at 2:18 pm

    instead of Thread, i use AsyncTask at the new intent

        protected void onCreate(Bundle savedInstanceState)
        {
          new loadPage().execute(null, null, null);             
        }
    
        public class loadPage extends AsyncTask<String, Integer, Void> {
    
            private ProgressDialog pdia;
    
            @Override
            protected void onPreExecute(){
                super.onPreExecute();
                pdia = new ProgressDialog(AppDetails.this);
                   pdia.setMessage("Loading...");
                  pdia.show();
                }
            @Override
            protected Void doInBackground(String... arg0) {
            // TODO Auto-generated method stub
             }
    
            @Override
            protected void onPostExecute(Void unused) {
            pdia.dismiss();
             }
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here is what I am currently using for the code and it's not working
Here's the code I'm currently working with: http://jsfiddle.net/gEMCm/ I'm trying to make an image
Here is the code I'm currently using: $.ajax({ success: function(){ $('.post_container').append('test <br />'); }
I'm currently using the validation code listed here in an application. I'd like to
I currently have a complete cover background image. Here is the code: #back{ /*
Here's a piece of code, currently driving me nuts. It's a UIView, with an
Here is my current code in the controller. @rating = (@approvals.count / @user.pages.count) +
there is ANR problem comes when we click gridView Item.My code is here.. @Override
Here is my code currently. I'm making a java program that seaches Active Directory
Here is the code currently used. public String getStringFromDoc(org.w3c.dom.Document doc) { try { DOMSource

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.