screenshot-tests-for-android icon indicating copy to clipboard operation
screenshot-tests-for-android copied to clipboard

Progressbar - Animation is not working

Open VarshaBhatiaPapershift opened this issue 5 years ago • 1 comments

I am using Progressbar in my codebase and handling the android: progress property in the xml and tried it via code as well. After running the connectedDebugAndroidTest command facing the below issue:

android.util.AndroidRuntimeException: Animators may only be run on Looper threads
	at android.animation.ValueAnimator.start(ValueAnimator.java:1044)

Can someone please let me know how to fix this issue? Tried with android progressbar and set the progress property in xml:

<ProgressBar
            android:id="@+id/progressButton"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:alpha="@dimen/downPopLevel4"
            android:progress="@android:integer/config_shortAnimTime"
            app:layout_constraintBottom_toBottomOf="parent"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="parent" />

& in the code

progressButton.progress = 30

VarshaBhatiaPapershift avatar Oct 30 '20 13:10 VarshaBhatiaPapershift

Not sure if you run this case with Espresso, if I was right, it might be the the limitation of Espresso itself.

liweijian avatar Jul 04 '21 08:07 liweijian