Tab progress bar

Put your problem here if it does not fit any of the other categories.

Tab progress bar

Postby vandzi » Fri Jun 11, 2010 12:12 pm

Hello, I can't found solution so I try to ask. My activity in tab is downloading some data which it will show in layout. I need to add progress bar.
this is my tab activity code
Code: Select all
      intent = new Intent().setClass(this, ReportsAround.class);
      // Initialize a TabSpec for each tab and add it to the TabHost
      spec = tabHost.newTabSpec("list").setIndicator(
            res.getString(R.string.list),
            res.getDrawable(R.drawable.ic_show_list)).setContent(intent);
      tabHost.addTab(spec);

and this is loading activity code. it doesn't works. progress bar isn't displayed.
Code: Select all
@Override
   public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      setContentView(R.layout.reportsaround_list);
      extras = new Bundle();
      String pdtitle = getResources().getString(R.string.downloadingtitle);
      String pdmessage = getResources().getString(R.string.downloadingmessage);
      pd = ProgressDialog.show(ReportsAround.this, pdtitle, pdmessage, true, false);   
   //this don't use GUI resources
      testInternetLoadData();
      pd.dismiss();
      //this use GUI
      loadReportsAround();
   
   }


can someone help with solution?
Thank You very much for opinions!
vandzi
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jun 11, 2010 11:31 am
Location: Slovakia

Top

Re: Tab progress bar

Postby Chitra » Fri Jun 11, 2010 2:12 pm

Hi vandzi,
Below code is useful to you for start and dismiss progress bar, based on activity...

//Startprogress
private ProgressDialog progDailog;
private void startprogress()
{
progDailog = ProgressDialog.show(this,"Title", "Msg here...",true);
}

//Stop progress
private void stopprogress()
{
progDailog.dismiss();
}

//Call startprogress method when you submit
startprogress();

//Call stopprogress method, After getting response
stopprogress();
Thanks,
Chitra
User avatar
Chitra
Master Developer
Master Developer
 
Posts: 213
Joined: Mon Mar 01, 2010 7:59 am
Location: Bangalore

Re: Tab progress bar

Postby vandzi » Fri Jun 11, 2010 2:32 pm

thanks, but i don't see how it resolve my problem. try to write it into my code
vandzi
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jun 11, 2010 11:31 am
Location: Slovakia

Re: Tab progress bar

Postby vandzi » Thu Jun 17, 2010 9:16 am

nobody knows?
vandzi
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jun 11, 2010 11:31 am
Location: Slovakia

Re: Tab progress bar

Postby anarche » Sun Jun 20, 2010 2:11 am

word from the wise old troll
thanks, but i don't see how it resolve my problem. try to write it into my code


is a good way to get no answers. Its your code, you write it in, you do the experimenting.
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Re: Tab progress bar

Postby nicholas.hauschild » Mon Jun 21, 2010 3:36 am

I would actually suggest that really, no one does know. The eternal mystery, perhaps you could figure it out for all of us! :D
nicholas.hauschild
Master Developer
Master Developer
 
Posts: 310
Joined: Fri Dec 04, 2009 4:50 am

Top

Re: Tab progress bar

Postby vandzi » Fri Jun 25, 2010 12:49 pm

anarche wrote:word from the wise old troll
thanks, but i don't see how it resolve my problem. try to write it into my code


is a good way to get no answers. Its your code, you write it in, you do the experimenting.


I wrote it because answear was the same what i have in my code
vandzi
Junior Developer
Junior Developer
 
Posts: 20
Joined: Fri Jun 11, 2010 11:31 am
Location: Slovakia

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 13 guests