gpt4 book ai didi

Android 进度条旋转加载栏无法在设备上运行

转载 作者:行者123 更新时间:2023-11-29 15:06:57 25 4
gpt4 key购买 nike

我有一个带有微调进度条的加载屏幕,它在我的 android studio 模拟器上旋转,在 Nexus 6 23api 上运行。此外,我已经尝试使用我 friend 的 Redmi 2 并且微调器正在工作。但是微调器在我的手机 galaxy s5 android 5.0 上保持静止(不旋转)。请帮忙

进度条的布局文件

 <ProgressBar
android:id="@+id/progressBar"
style="?android:attr/progressBarStyleLarge"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:indeterminate="true"
android:indeterminateDrawable="@drawable/loading_bar"
android:layout_below="@+id/loading_mod_logo"
android:layout_marginTop="20dp"/>

加载屏幕java代码

public class LoadingScreen extends AppCompatActivity {
private ProgressBar spinner;
private boolean registered = false;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_loading_screen);

//spinner is loading bar at loading screen
spinner=(ProgressBar)findViewById(R.id.progressBar);

最佳答案

我遇到了同样的问题,经过长时间的调试后我发现动画被关闭了:

android.animation.ValueAnimator.sDurationScale == 0.0f

这可以通过开发者选项 > 绘图 > 动画持续时间缩放 来缓解。将其设置为“关闭”以外的任何值以从 0.0f 增加。

我知道这不是您问题的根本原因,但希望它能帮助其他人。

关于Android 进度条旋转加载栏无法在设备上运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36326429/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com