循环进度条不会更新进度并保持动画

时间:2016-08-11 09:10:45

标签: android progress-bar

美好的一天。我正在尝试用进度条实现循环进度。我不想横向我希望循环进度。无论如何我得到它像google所说的一样但我的进度条只是保持动画和动画在循环中,而不是相应地更新它的动画进展...我不知道我做错了什么。你能帮助我吗?

这是进度条的布局。

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#000000"
android:keepScreenOn="true"
tools:context="ink.activities.FullscreenActivity">

<ImageView
    android:id="@+id/fullscreen_content"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:gravity="center"
    android:scaleType="fitXY" />

<ProgressBar
    android:id="@+id/imageLoadingProgress"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:indeterminate="false"
    android:max="240780" />

以下是我如何设定进度。

 Ion.with(this).load(fullUrlToLoad).progressHandler(new ProgressCallback() {
            @Override
            public void onProgress(long downloaded, long total) {
                Log.d("fasfsafasfa", "downloaded: " + downloaded);
                Log.d("fasfsafasfa", "total: " + total);
                imageLoadingProgress.setProgress((int) downloaded);
            }
        }).intoImageView(mContentView).setCallback(new FutureCallback<ImageView>() {
            @Override
            public void onCompleted(Exception e, ImageView result) {
                imageLoadingProgress.setVisibility(View.GONE);
            }
        });

但不幸的是,你知道它只是一个免费的动画圈。如何解决这个问题?

我希望从官方指南中确定循环确定

https://material.google.com/components/progress-activity.html#progress-activity-types-of-indicators

0 个答案:

没有答案
相关问题