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

Guice Injection While Using Reflection to Call Multiple Classes
Output of returning the digit does not come as expected?
String array argument error using java [duplicate]
JFrame - setLocation
Can't write List<object> in Parcel
Correct number `x` divided into integer `y` parts and rounded to `2` decimal places so the sum is `x` again
Error while connecting jmx on Production
Displaying system information on the desktop similar to BGInfo
Liquibase migration fails with dropwizard
BufferedReader readLine() method returns boolean?
How to iterate over String(char[])
Making a data class
why can super access non static variable of superclass?
Creating a Web Browser in Java
Popup Menu anchor with large EditText
getting a multi decimal number from a string [duplicate]

Categories

HOME
cakephp
client
relative-path
fme
relay
webstorm
youtube-dl
kalman-filter
retrofit
enterprise-library-5
fancybox
awesome-wm
midi
handsontable
windows-azure-storage
circular-dependency
leiningen
event-handling
zebra-printers
clearcase-ucm
after-effects
finite-automata
nhibernate-envers
firefox-webextensions
core-text
p-value
angular2-aot
numerical-methods
bootstrap-material-design
wtx
jspm
stormpath
google-sites-2016
stringtemplate
environment-modules
bytecode-manipulation
komodoedit
revapi
blogengine.net
directory-structure
libusb-win32
media-player
mcafee
iso8601
eventkit
nested-sets
ableton-live
httplistener
react-native-listview
tcpserver
lib.web.mvc
icu4j
atk4
varargs
tableau-online
event-bubbling
applescript-objc
gulp-less
android-radiobutton
contenttype
yorick
braille
bundles
datagridviewcolumn
industrial
mysqltuner
commoncrypto
wsdl-2.0
referrer
runas
javaspaces
uiviewanimation-curve
ohm
asyncfileupload
bigcouch
nsdatecomponents
zpt
gcj
xdomainrequest
rfc1123
yetanotherforum
mysql-error-1005
w3wp.exe
sortable-tables
ti-dsp
boost-smart-ptr
sustainable-pace
procedural-music
port-number
document-conversion

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