See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| fun View.setShadow( | |
| @ColorRes shadowColor: Int, | |
| @DimenRes cornerRadius: Int, | |
| @DimenRes elevation: Int, | |
| shadowGravity: Int = Gravity.BOTTOM, | |
| @ColorRes backgroundColorResource: Int = 0 | |
| ) { | |
| val resource = context.resources | |
| val firstLayer = 0 | |
| val ratioTopBottom = 3 |
| /** Set the View visibility to VISIBLE and eventually animate the View alpha till 100% */ | |
| fun View.visible(animate: Boolean = true) { | |
| if (animate) { | |
| animate().alpha(1f).setDuration(300).setListener(object : AnimatorListenerAdapter() { | |
| override fun onAnimationStart(animation: Animator) { | |
| super.onAnimationStart(animation) | |
| visibility = View.VISIBLE | |
| } | |
| }) | |
| } else { |