use the primary color for coloring Fabs

This commit is contained in:
tibbi 2017-01-02 19:39:45 +01:00
parent 4034cbd59d
commit 93272b0b0f
3 changed files with 5 additions and 2 deletions

View File

@ -1,6 +1,7 @@
package com.simplemobiletools.calendar.activities
import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color
import android.os.Bundle
import android.support.design.widget.Snackbar
@ -33,6 +34,7 @@ class DayActivity : SimpleActivity(), DayFragment.DeleteListener, ViewPager.OnPa
fillViewPager(mDayCode)
day_fab.backgroundTintList = ColorStateList.valueOf(baseConfig.primaryColor)
day_fab.setOnClickListener { addNewEvent() }
}

View File

@ -1,6 +1,7 @@
package com.simplemobiletools.calendar.activities
import android.content.Intent
import android.content.res.ColorStateList
import android.graphics.Color
import android.os.Bundle
import android.support.design.widget.Snackbar
@ -45,6 +46,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener {
override fun onResume() {
super.onResume()
updateWidgets()
calendar_fab.backgroundTintList = ColorStateList.valueOf(baseConfig.primaryColor)
}
override fun onPause() {

View File

@ -23,8 +23,7 @@ class SmallMonthView(context: Context, attrs: AttributeSet, defStyle: Int) : Vie
var mEvents: ArrayList<Int>? = null
constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0) {
}
constructor(context: Context, attrs: AttributeSet) : this(context, attrs, 0)
fun setDays(days: Int) {
mDays = days