mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-02-02 08:56:50 +01:00
use proper colors at the date picker dialog
This commit is contained in:
parent
192c330ae2
commit
adcd33566c
@ -3,7 +3,10 @@ package com.simplemobiletools.contacts.pro.dialogs
|
||||
import androidx.appcompat.app.AlertDialog
|
||||
import com.simplemobiletools.commons.activities.BaseSimpleActivity
|
||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||
import com.simplemobiletools.commons.helpers.isSPlus
|
||||
import com.simplemobiletools.contacts.pro.R
|
||||
import com.simplemobiletools.contacts.pro.extensions.config
|
||||
import kotlinx.android.synthetic.main.dialog_date_picker.*
|
||||
import kotlinx.android.synthetic.main.dialog_date_picker.view.*
|
||||
import org.joda.time.DateTime
|
||||
import java.util.*
|
||||
@ -36,6 +39,12 @@ class MyDatePickerDialog(val activity: BaseSimpleActivity, val defaultDate: Stri
|
||||
}
|
||||
}
|
||||
|
||||
if (activity.config.isUsingSystemTheme && isSPlus()) {
|
||||
val dialogBackgroundColor = activity.getColor(R.color.you_dialog_background_color)
|
||||
dialog_holder.setBackgroundColor(dialogBackgroundColor)
|
||||
date_picker.setBackgroundColor(dialogBackgroundColor)
|
||||
}
|
||||
|
||||
view.date_picker.updateDate(year, month, day)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user