Answers for "kotlin optional parameter"

0

kotlin optional parameter

fun View.fadeOut(duration: Long = 500): ViewPropertyAnimator {
    return animate()
            .alpha(0.0f)
            .setDuration(duration)
}

icon.fadeOut() 			// fade out with default time (500)
icon.fadeOut(1000) 		// fade out with custom time
Posted by: Guest on April-20-2021

Browse Popular Code Answers by Language