Merge pull request #1617 from ismailnurudeen/fix/confirm_call_dialog_anim
fix: added a shake animation and delay to dial icon
This commit is contained in:
commit
e1401480c6
2 changed files with 25 additions and 1 deletions
|
@ -20,7 +20,7 @@ class CallConfirmationDialog(val activity: BaseSimpleActivity, val callee: Strin
|
|||
val title = String.format(activity.getString(R.string.call_person), callee)
|
||||
activity.setupDialogStuff(view, this, titleText = title) { alertDialog ->
|
||||
view.call_confirm_phone.apply {
|
||||
startAnimation(AnimationUtils.loadAnimation(activity, R.anim.pulsing_animation))
|
||||
startAnimation(AnimationUtils.loadAnimation(activity, R.anim.shake_pulse_animation))
|
||||
setOnClickListener {
|
||||
callback.invoke()
|
||||
alertDialog.dismiss()
|
||||
|
|
24
commons/src/main/res/anim/shake_pulse_animation.xml
Normal file
24
commons/src/main/res/anim/shake_pulse_animation.xml
Normal file
|
@ -0,0 +1,24 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<set xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shareInterpolator="false">
|
||||
<scale
|
||||
android:duration="500"
|
||||
android:fromXScale="1"
|
||||
android:fromYScale="1"
|
||||
android:toXScale="1.2"
|
||||
android:toYScale="1.2"
|
||||
android:startOffset="1000"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:repeatCount="infinite"
|
||||
android:repeatMode="reverse"/>
|
||||
<rotate
|
||||
android:duration="200"
|
||||
android:fromDegrees="-5"
|
||||
android:toDegrees="5"
|
||||
android:pivotX="50%"
|
||||
android:pivotY="50%"
|
||||
android:repeatCount="infinite"
|
||||
android:repeatMode="reverse"/>
|
||||
</set>
|
||||
|
Loading…
Reference in a new issue