add a pulsing background to the reminder activity draggable element

This commit is contained in:
tibbi
2018-07-08 14:17:25 +02:00
parent 5552ac2c65
commit d7c2323489
5 changed files with 48 additions and 4 deletions

View File

@ -6,18 +6,17 @@ import android.media.MediaPlayer
import android.net.Uri
import android.os.Bundle
import android.os.Handler
import android.view.animation.AnimationUtils
import com.simplemobiletools.clock.R
import com.simplemobiletools.clock.extensions.*
import com.simplemobiletools.clock.helpers.ALARM_ID
import com.simplemobiletools.clock.helpers.getPassedSeconds
import com.simplemobiletools.clock.models.Alarm
import com.simplemobiletools.commons.extensions.applyColorFilter
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.showPickSecondsDialog
import com.simplemobiletools.commons.extensions.updateTextColors
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.MINUTE_SECONDS
import kotlinx.android.synthetic.main.activity_reminder.*
class ReminderActivity : SimpleActivity() {
private val INCREASE_VOLUME_DELAY = 3000L
@ -52,6 +51,9 @@ class ReminderActivity : SimpleActivity() {
reminder_title.text = label
reminder_text.text = if (isAlarmReminder) getFormattedTime(getPassedSeconds(), false, false) else getString(R.string.time_expired)
reminder_draggable_background.startAnimation(AnimationUtils.loadAnimation(this, R.anim.pulsing_animation))
reminder_draggable_background.applyColorFilter(getAdjustedPrimaryColor())
reminder_stop.setOnClickListener {
finish()
}