allow changing the Timer ringtone

This commit is contained in:
tibbi 2018-03-09 21:44:01 +01:00
parent 071105d749
commit b771f05881
1 changed files with 8 additions and 0 deletions

View File

@ -11,6 +11,7 @@ import android.view.ViewGroup
import com.simplemobiletools.clock.R
import com.simplemobiletools.clock.activities.SimpleActivity
import com.simplemobiletools.clock.dialogs.MyTimePickerDialogDialog
import com.simplemobiletools.clock.dialogs.SelectAlarmSoundDialog
import com.simplemobiletools.clock.extensions.colorLeftDrawable
import com.simplemobiletools.clock.extensions.config
import com.simplemobiletools.commons.extensions.*
@ -97,6 +98,13 @@ class TimerFragment : Fragment() {
timer_sound.text = config.timerSoundTitle
timer_sound.colorLeftDrawable(textColor)
timer_sound.setOnClickListener {
SelectAlarmSoundDialog(activity as SimpleActivity, config.timerSoundUri) {
config.timerSoundTitle = it.title
config.timerSoundUri = it.uri
timer_sound.text = it.title
}
}
}
updateIcons()