Android 进度条显示异常
我需要在一些页面中显示ProgressBar 这是我的代码:Android 进度条显示异常,android,progress-bar,Android,Progress Bar,我需要在一些页面中显示ProgressBar 这是我的代码: <ProgressBar android:id="@+id/loading_spinner" style="?android:progressBarStyleLarge" android:layout_width="wrap_content" android:layout_height="wrap_content"
<ProgressBar
android:id="@+id/loading_spinner"
style="?android:progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
(第二张图片)
您为每个活动使用不同的主题,从而为不同的活动提供不同风格的进度条
解决方案:
<ProgressBar
android:id="@+id/loading_spinner"
style="@android:style/Widget.Holo.Light.ProgressBar.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
如果需要所有进度条,可以对所有进度条使用一种样式
示例:
<ProgressBar
android:id="@+id/loading_spinner"
style="@android:style/Widget.Holo.Light.ProgressBar.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>
一个活动的背景为黑色,另一个活动的背景为白色。表示您正在为至少一个活动设置不同的样式。你是怎么做到的?@selbie第一张照片来自ApiDemo。因为在我的应用程序中很难用ProgressBar获得这种风格的屏幕截图。我可以向你展示我的活动风格。我更新了问题。非常感谢。呃。。。我更新我的问题并在那里添加我的活动样式。我真的在那里使用不同的系统吗?@android_su记住所有手机都有自己的默认主题,添加主题。NoTitleBar
将更改默认主题
I don't know why! Some of them are the ics style, other of them seem like 2.x style.
<ProgressBar
android:id="@+id/loading_spinner"
style="@android:style/Widget.Holo.Light.ProgressBar.Large"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:visibility="gone"/>