0

I add ProgressBar into my activity_main

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ProgressBar
        android:id="@+id/progress_circular"
        android:indeterminate="true"
        android:layout_width="50dp"
        android:layout_height="50dp"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintStart_toStartOf="parent"/>

</androidx.constraintlayout.widget.ConstraintLayout>

it should spin, but it doesn't. I do everything as in the official documentation, what am I doing wrong? enter image description here

Ксения
  • 67
  • 1
  • 8

2 Answers2

0

It's working!

Here is the output!

problem is not in the XML code

Ronak Sethi
  • 607
  • 5
  • 12
0

I had this problem too. You should enable all animations in the Developers Option on your phone. It will work.

Hassan Alizadeh
  • 103
  • 1
  • 8