public ViewPropertyAnimator setDuration ( long duration ) { if ( duration < 0 ) { throw new IllegalArgumentException ( "Animators cannot have negative duration: " + duration ) ; } mDurationSet = true ; mDuration = duration ; return this ; }
Sets the duration for the underlying animator that animates the requested properties . By default the animator uses the default value for ValueAnimator . Calling this method will cause the declared value to be used instead .