Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android indeterminate ProgressBar is not animating

Tags:

android

The strange situation I have

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/activity_main"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"/>

    <ProgressBar
        android:id="@+id/my_progressBar"
        style="@style/Widget.AppCompat.ProgressBar.Horizontal"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:indeterminate="true"/>
</LinearLayout>

And the result is enter image description here

The ProgressBar is not animating. I'm doing something wrong?

like image 516
Sergey Shustikov Avatar asked Dec 16 '16 15:12

Sergey Shustikov


People also ask

What is indeterminate ProgressBar?

ProgressBar is used to display the progress of an activity while the user is waiting. You can display an indeterminate progress (spinning wheel) or result-based progress.

Which attribute is used to display ProgressBar horizontally?

In Android, by default a progress bar will be displayed as a spinning wheel but If we want it to be displayed as a horizontal bar then we need to use style attribute as horizontal. It mainly use the “android. widget. ProgressBar” class.


1 Answers

For future searches. It was pretty easy and pretty hard to find the mistake.

Just make sure, that your animations are ENABLED in phone developer options.

like image 99
Sergey Shustikov Avatar answered Oct 05 '22 02:10

Sergey Shustikov