Android的动作条下的进度条,并删除圆进步进度条、动作、Android

2023-09-12 02:06:03 作者:孤独终老

我使用ActionBarSherlock,以及使用的操作栏自定义视图,我想使进度条,使用该code

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?

谢谢

推荐答案

的原因圈,是此行的code。

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.

看这里的例子。

对于这里一个很好的答案看了类似的问题。

For a similar question with a good answer look here.