Nexus 5 Android 5.0.1上未显示某些ProgressBar样式 [英] Certain ProgressBar styles not shown on Nexus 5 Android 5.0.1

查看:113
本文介绍了Nexus 5 Android 5.0.1上未显示某些ProgressBar样式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的布局如下:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:orientation="vertical"
              android:layout_width="match_parent"
              android:layout_height="match_parent">

    <ProgressBar
        style="@android:style/Widget.Material.ProgressBar.Large"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"/>

</LinearLayout>

我有一个运行Android 5.0.1的Nexus 5,它不显示ProgressBar,这显然是因为其风格.当我将样式设置为

I have a Nexus 5 running Android 5.0.1 that doesn't display the ProgressBar, obviously because of the style. When I set the style for example to

 style="@android:style/Widget.ProgressBar.Large"

 style="@android:style/Widget.Holo.ProgressBar.Large"

它被显示.我有一个相同的Nexus 5,它也正在运行Android 5.0.1,可以正常显示所有ProgressBar. 启用开发人员选项中的绘制布局边框"选项,它表明ProgressBar包含在布局中,只是没有显示.

it is shown. I have an identical Nexus 5 also running Android 5.0.1 which displays all the ProgressBars fine. Enabling the 'draw layout borders' option in the developers options, it shows that the ProgressBar is included in the layout, it is simply not shown.

这似乎很奇怪,对这里可能发生的事情有任何想法吗?

This seems very strange, any idea on what could be going on here?

推荐答案

我遇到了同样的问题,但是是因为开发人员手机的动画比例缩放为0(全部为3).

I was having the same issue but was because the developer phone have animations scales to 0 (all 3).

启用设备上的所有动画,也许您将能够看到进度条,因此对于启用了动画的普通人来说,进度条会很好看.

Enable all the animations on the device and maybe you will be able to see the progress bar, so for normal people that will have animations enabled the progress bar will appear fine.

这篇关于Nexus 5 Android 5.0.1上未显示某些ProgressBar样式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆