I am using ActionBarSherlock, and using custom view for the action bar and i want to make progress bar, using this code
requestWindowFeature(Window.FEATURE_PROGRESS);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_main);
setSupportProgressBarIndeterminateVisibility(true);
setProgressBarIndeterminate(true);
but somehow the progress bar is appear above the action bar and also it put a circle progress indication at left most of action bar,
how to put the progress bar under the action bar and remove the circle indicator?
thank you
You can set your progressbar's visibility to invisible or gone through progressbar. setVisibility(View. INVISIBLE); or progressBar.
There are 2 types of progress bars: determinate and indeterminate. The former is used when the amount of information that needs to be loaded is detectable. The latter is used when the system is unsure how much needs to be loaded or how long it will take.
The reason for the circle, is this line of code.
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
And as for the progressbar this should enable it.
requestWindowFeature(Window.FEATURE_PROGRESS);
As you've already done, what you need now is to alter it.
look here for an example.
For a similar question with a good answer look here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With