我在我的一个 Activity 中发现了 Material Design ProgressBar 的一个奇怪问题。动画并没有真正流畅地运行,如下所示:http://gfycat.com/RadiantFocusedAuk .值得一提的是,这只发生在我的一个 ProgressBar 上。其他的则按应有的方式显示。
这个布局非常简单:
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:id="@+id/detail_loan_statustext"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"
android:layout_gravity="center_vertical"
android:padding="8dp"/>
<ProgressBar
android:id="@+id/detail_loan_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
style="?android:attr/progressBarStyle"/>
<Button
android:id="@+id/detail_loan_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical"
android:layout_margin="8dp"/>
</LinearLayout>
我试着摆弄一下样式,结果发现这种行为只有在使用 Material-Style 时才会发生。使用 Holo-Style 将使 ProgressBar 正确地动画化。
有没有人遇到过类似的问题?
有没有办法摆脱这个?
最佳答案
这似乎是 5.0.0 中的问题。 5.0.1 中不再出现该问题。
关于android - Material ProgressBar 的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27166485/