0

I implemented Progress Bar on action bar during network call but displaying the progress Bar on Action Bar is too large. I want to set dynamic size of progressbar. I searched lot but not achieve my goal.so following is the code for ActionBar ProgressBar. Please anybody suggest me some answer and anybody having another way to do above task please tell me.

    protected void onCreate(Bundle savedInstanceState) {

        requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); }

    protected void onPreExecute() {

            // Show IndeterminateProgressBar

            setSupportProgressBarIndeterminateVisibility(true); }

    protected void onPostExecute(Void result) {

            setSupportProgressBarIndeterminateVisibility(false);}

Thanks In Advance

nilesh wani
  • 1,261
  • 5
  • 18
  • 30
  • @nilesh..following link might be of some help: http://stackoverflow.com/questions/9162481/styling-indeterminate-progressbar-on-actionbar?rq=1 – Snehal Poyrekar Aug 05 '13 at 10:29

1 Answers1

0

Set a Timer and use LayoutParams to change the size.

{ParentLayout}.LayoutParams params = new {ParentLayout}.LayoutParams(h,w); 
progressBar.setLayoutParams(params);

And use the built-in java Timer to time it.