Progress bar Undetermined

0

I have a problem, my ProgressBar is displayed well but this is static without any effect and I need it to move randomly while loading a page

My code is as follows:

<ProgressBar
    android:id="@+id/progreso"
    style="@style/Widget.AppCompat.ProgressBar.Horizontal"
    android:layout_width="match_parent"
    android:layout_height="15dp"
    android:layout_marginTop="68.5dp"
    android:padding="0dp"
    android:indeterminate="true"
    />

what will it be?

    
asked by Gerardo Fuentes 01.09.2017 в 02:10
source

2 answers

1

You have to delete the style="@style/Widget.AppCompat.ProgressBar.Horizontal" property. That property is what makes the ProgressBar indeterminate.

<ProgressBar
    android:id="@+id/progreso"
    android:layout_width="match_parent"
    android:layout_height="15dp"
    android:layout_marginTop="68.5dp"
    android:padding="0dp"/>

Official Documentation

    
answered by 01.09.2017 в 02:26
0

I can solve it, delete the line style="@style/Widget.AppCompat.ProgressBar.Horizontal" and replace it with the line style="@android:style/Widget.Holo.ProgressBar.Horizontal"

<ProgressBar
    android:id="@+id/progreso"
    style="@android:style/Widget.Holo.ProgressBar.Horizontal"
    android:layout_width="match_parent"
    android:layout_height="15dp"
    android:layout_marginTop="68.5dp"
    android:padding="0dp"
    android:visibility="gone"
    android:indeterminate="true"
    />
    
answered by 01.09.2017 в 02:32