use the adjusted primary color at filter checkboxes to improve b&w theme

This commit is contained in:
tibbi 2018-01-09 22:09:09 +01:00
parent 14b94d1eb0
commit 62294150bb

View File

@ -8,6 +8,7 @@ import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.activities.SimpleActivity
import com.simplemobiletools.calendar.extensions.config
import com.simplemobiletools.calendar.models.EventType
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
import com.simplemobiletools.commons.interfaces.MyAdapterListener
import kotlinx.android.synthetic.main.filter_event_type_view.view.*
@ -70,7 +71,7 @@ class FilterEventTypeAdapter(val activity: SimpleActivity, val eventTypes: List<
class ViewHolder(view: View, val adapterListener: MyAdapterListener, val activity: SimpleActivity) : RecyclerView.ViewHolder(view) {
fun bindView(eventType: EventType): View {
itemView.apply {
filter_event_type_checkbox.setColors(activity.config.textColor, activity.config.primaryColor, activity.config.backgroundColor)
filter_event_type_checkbox.setColors(activity.config.textColor, activity.getAdjustedPrimaryColor(), activity.config.backgroundColor)
filter_event_type_checkbox.text = eventType.getDisplayTitle()
filter_event_type_color.setBackgroundWithStroke(eventType.color, activity.config.backgroundColor)
filter_event_type_holder.setOnClickListener { viewClicked(!filter_event_type_checkbox.isChecked) }