【问题标题】:Android Indeterminate Progress Bar not animatedAndroid不确定进度条没有动画
【发布时间】:2012-12-30 12:18:41
【问题描述】:

我想要一个无限的进度条,就像这里在 Activity Indicatior,Activity bar 下一样

http://www.google.de/imgres?um=1&hl=de&client=firefox-a&hs=H9I&tbo=d&rls=org.mozilla:de:official&biw=1280&bih=697&tbm=isch&tbnid=AX0X8So5n4iiPM:&imgrefurl=http://developer.android.com/design/building-blocks/progress.html&docid=8Hr06JHpY9T3rM&imgurl=http://developer.android.com/design/media/progress_download.png&w=760&h=348&ei=bDDgULSzELL64QTa74DgBg&zoom=1&iact=rc&dur=318&sig=116802181569187224100&page=2&tbnh=143&tbnw=265&start=35&ndsp=40&ved=1t:429,r:51,s:0,i:243&tx=131&ty=39

我的实现没有动画,也没有旋转。怎么了?谢谢

<ProgressBar
    android:id="@+id/progressBar"
    style="?android:attr/progressBarStyleHorizontal"
    android:layout_width="match_parent"
    android:layout_height="wrap_content" />

【问题讨论】:

  • 我有一个类似的问题,当我将 Dialog 主题更改为 @android:style/Theme.Holo.Light.Dialog.NoActionBar

标签: android android-activity widget progress-bar


【解决方案1】:

android:indeterminate="true" 添加到您的 xml - 这应该可以解决它。

【讨论】:

    【解决方案2】:

    这是我的 xml,它工作正常:

    <ProgressBar
        android:id="@+id/progressBar1"
        style="?android:attr/progressBarStyleLarge"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-07-21
      • 1970-01-01
      • 2017-02-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多