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

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

问题描述

我有以下布局:

<?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.

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

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