Adding progressDialog to Activity Title

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Adding progressDialog to Activity Title

Postby binhsoledas » Tue Sep 29, 2009 5:14 am

Hello.

When i run AndFTP application. after connect and get list file from server FTP, i see progressDialog display on Activity Title and when progressDialog dismiss, list will be display on screen. How to add progressDialog to activity title and how to its handling event ?

Image

Thanks
binhsoledas
Junior Developer
Junior Developer
 
Posts: 10
Joined: Wed Sep 16, 2009 4:16 am

Top

Postby azraeal » Wed Sep 30, 2009 7:31 pm

It's a custom title bar. There's an example in the API sample.

Link here:
http://developer.android.com/guide/samp ... Title.html

Line of importance:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.custom_title_1);
  2.  
  3.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


Easy, right?
azraeal
Experienced Developer
Experienced Developer
 
Posts: 71
Joined: Fri Sep 04, 2009 6:34 pm
Location: California

Postby Aggtaa » Tue Nov 10, 2009 12:35 pm

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
Parsed in 0.031 seconds, using GeSHi 1.0.8.4


then
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. setProgressBarIndeterminateVisibility(true);
Parsed in 0.034 seconds, using GeSHi 1.0.8.4
to switch the thing on

and
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  setProgressBarIndeterminateVisibility(false);
Parsed in 0.035 seconds, using GeSHi 1.0.8.4
to switch it off
Aggtaa
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Nov 10, 2009 12:32 pm

Postby cauchy » Mon Dec 28, 2009 4:16 pm

Hi,

I can easily add a custom title using the Window.FEATURE_CUSTOM_TITLE, I can also display a progress view using Window.FEATURE_INDETERMINATE_PROGRESS but it is not possible to request both features as no other title related feature can be applied when Custom Title is set.
Is there an easy way to use "setProgressBarIndeterminateVisibility" with a custom title or do I have to add a progress to my custom layout and make it appear/disappear myself?
For now I'm planning to override setProgressBarIndeterminateVisibility and do this there but I just wanted to know if there was some most obvious way of doing this.

Thanks for your help :-).
cauchy
Freshman
Freshman
 
Posts: 4
Joined: Thu Jan 10, 2008 9:44 am
Location: Marseille, France

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests