java


ObjectAnimator repeat loop delay


<?xml version="1.0" encoding="utf-8"?>
<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:propertyName="rotationX"
android:valueFrom="0"
android:valueTo="-360"
android:repeatCount="infinite">
</objectAnimator>
This is my object animator xml
//Animating the NormalLayout
final ObjectAnimator anim4 = (ObjectAnimator) //Object animator
AnimatorInflater.loadAnimator(this, R.animator.rotate_four);
//And this is my java code
I want to add delay between its looping, like 3 secs between looping again. I have tried animation listeners onRepeat, onEnd kinda stuff but it didn't worked. I want some delay between looping.
Any help would be appreciated to its utmost limit.
please try
1.delete the xml property android:repeatCount="infinite"
2.add the java code
anim4.addListener(new AnimatorListenerAdapter(){
#Override
public void onAnimationEnd(Animator animation) {
new Handler().postDelayed(new Runnable() {
#Override
public void run() {
anim4.start();
}
}, 3000);
}
});

Related Links

Incrementing test data (mobile number) for load testing 1 million registrations
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'day0_.calendar_id' in 'field list'
Ho exactly works JPA in Spring? Some doubts
How to run tests based on test tag of testng.xml using Maven?
Changing a variable in Forloop
android check if request is coming from my app
Proper escaping for ng-init
Using Using OAuth 2.0 for existing Web Applications
Image retrieval is slow
Byte Buddy causes IncompatibleClassChangeError
Java Swing: Custom ComponentUI implementation
Need help adding MouseListener to 2d array of JPanels
Try-Catch block termination
How to negate a vowel condition using Regex in java
Java cast object[] to model
Include external file (not jar) to executable jar

Categories

HOME
ibm-bluemix
compiler-construction
reflection
view
iterator
hashmap
q
spring-cloud-stream
frameworks
jgroups
jpeg
google-project-tango
retrofit
mvvmcross
quickbooks
zebra-printers
transformation
facebook-page
sms-gateway
excel-vba-mac
jquery-ajaxq
xpages-ssjs
sparse-matrix
dynamic-featured-image
nhapi
windows-error-reporting
elasticsearch-net
dbclient
tinymce-4
data-manipulation
catel
azure-sql-database
atl
libvpx
android-fingerprint-api
splice
powershell-dsc
bootstrap-dialog
unixodbc
flashair
convertapi
sas-jmp
revapi
atomicity
jquery-nestable
theming
winscp-net
pillow
spring-cache
redundancy
orthogonal
smart-table
gnome-shell-extensions
watchconnectivity
removechild
etsy
paypal-express
impresspages
jwplayer7
connect-by
phpcas
eclipse-clp
t4mvc
angular-leaflet-directive
myo
fluid-dynamics
generic-programming
bridge.net
nsbutton
internet-connection
onactivityresult
dml
navigationservice
mbr
monomac
apc
google-cloud-save
opcache
back-stack
padarn
type-equivalence
cassini-dev
unc
dbproviderfactories
enter
code-cleanup
cufon
gwt-ext
gnu-prolog
joyent
horizontal-accordion
telerik-scheduler
yslow
sudzc
dbal
javap
anti-piracy
spec#
commodore

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App