couple Black & White theme improvements

This commit is contained in:
tibbi 2018-01-07 22:23:48 +01:00
parent 4dbb750035
commit e9165ad41d
2 changed files with 6 additions and 8 deletions

View File

@ -11,6 +11,7 @@ import com.bumptech.glide.load.resource.drawable.DrawableTransitionOptions
import com.bumptech.glide.request.RequestOptions
import com.bumptech.glide.signature.ObjectKey
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
import com.simplemobiletools.commons.extensions.getColoredDrawableWithColor
import com.simplemobiletools.commons.interfaces.MyAdapterListener
import com.simplemobiletools.contacts.R
@ -85,7 +86,7 @@ class SelectContactsAdapter(val activity: SimpleActivity, val contacts: List<Con
fun bindView(contact: Contact, startNameWithSurname: Boolean, contactDrawable: Drawable, config: Config): View {
itemView.apply {
contact_checkbox.beVisibleIf(showCheckbox)
contact_checkbox.setColors(config.textColor, config.primaryColor, config.backgroundColor)
contact_checkbox.setColors(config.textColor, context.getAdjustedPrimaryColor(), config.backgroundColor)
val textColor = config.textColor
contact_name.text = contact.getFullName(startNameWithSurname)

View File

@ -4,10 +4,8 @@ import android.content.Context
import android.graphics.Paint
import android.support.design.widget.CoordinatorLayout
import android.util.AttributeSet
import com.simplemobiletools.commons.extensions.beVisibleIf
import com.simplemobiletools.commons.extensions.isActivityDestroyed
import com.simplemobiletools.commons.extensions.toast
import com.simplemobiletools.commons.extensions.updateTextColors
import android.view.ViewGroup
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.SORT_BY_FIRST_NAME
import com.simplemobiletools.commons.helpers.SORT_BY_SURNAME
import com.simplemobiletools.contacts.R
@ -61,7 +59,6 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
fun primaryColorChanged(color: Int) {
fragment_fastscroller.updatePrimaryColor()
fragment_fab.setColors(config.textColor, color, config.backgroundColor)
fragment_fastscroller.updateBubblePrimaryColor()
}
@ -181,10 +178,10 @@ abstract class MyViewPagerFragment(context: Context, attributeSet: AttributeSet)
}
private fun updateViewStuff() {
context.updateTextColors(fragment_wrapper)
context.updateTextColors(fragment_wrapper.parent as ViewGroup)
fragment_fastscroller.updateBubbleColors()
fragment_fastscroller.allowBubbleDisplay = config.showInfoBubble
fragment_placeholder_2.setTextColor(config.primaryColor)
fragment_placeholder_2.setTextColor(context.getAdjustedPrimaryColor())
}
abstract fun fabClicked()