couple text color changes
This commit is contained in:
parent
4e3a63f147
commit
1982af9a52
|
@ -1,7 +1,6 @@
|
|||
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
|
||||
|
@ -12,6 +11,7 @@ import com.simplemobiletools.calendar.adapters.MyDayPagerAdapter
|
|||
import com.simplemobiletools.calendar.fragments.DayFragment
|
||||
import com.simplemobiletools.calendar.helpers.DAY_CODE
|
||||
import com.simplemobiletools.calendar.helpers.Formatter
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import kotlinx.android.synthetic.main.activity_day.*
|
||||
import org.joda.time.DateTime
|
||||
import java.util.*
|
||||
|
@ -34,8 +34,8 @@ class DayActivity : SimpleActivity(), DayFragment.DeleteListener, ViewPager.OnPa
|
|||
|
||||
fillViewPager(mDayCode)
|
||||
|
||||
day_fab.backgroundTintList = ColorStateList.valueOf(baseConfig.primaryColor)
|
||||
day_fab.setOnClickListener { addNewEvent() }
|
||||
updateTextColors(day_coordinator)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
@ -14,10 +14,7 @@ import com.simplemobiletools.calendar.extensions.scheduleNotification
|
|||
import com.simplemobiletools.calendar.helpers.*
|
||||
import com.simplemobiletools.calendar.models.Event
|
||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||
import com.simplemobiletools.commons.extensions.hideKeyboard
|
||||
import com.simplemobiletools.commons.extensions.showKeyboard
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
import com.simplemobiletools.commons.extensions.value
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import kotlinx.android.synthetic.main.activity_event.*
|
||||
import org.joda.time.DateTime
|
||||
import org.joda.time.DateTimeZone
|
||||
|
@ -79,6 +76,7 @@ class EventActivity : SimpleActivity(), DBHelper.EventUpdateListener {
|
|||
reminderItemSelected()
|
||||
}
|
||||
}
|
||||
updateTextColors(event_scrollview)
|
||||
}
|
||||
|
||||
private fun setupEditEvent() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
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
|
||||
|
@ -18,6 +17,7 @@ import com.simplemobiletools.calendar.extensions.updateWidgets
|
|||
import com.simplemobiletools.calendar.fragments.EventListFragment
|
||||
import com.simplemobiletools.calendar.helpers.*
|
||||
import com.simplemobiletools.calendar.helpers.Formatter
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_AMBILWARNA
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_JODA
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
|
||||
|
@ -46,7 +46,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener {
|
|||
override fun onResume() {
|
||||
super.onResume()
|
||||
updateWidgets()
|
||||
calendar_fab.backgroundTintList = ColorStateList.valueOf(baseConfig.primaryColor)
|
||||
updateTextColors(calendar_coordinator)
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
|
|
|
@ -169,16 +169,16 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
|
|||
week_num.visibility = View.VISIBLE
|
||||
|
||||
for (i in 0..5) {
|
||||
val weekIdTV = findViewById(mRes.getIdentifier("week_num_" + i, "id", mPackageName)) as TextView?
|
||||
weekIdTV!!.text = mDays!![i * 7].weekOfYear.toString() + ":"
|
||||
weekIdTV.setTextColor(mWeakTextColor)
|
||||
weekIdTV.visibility = View.VISIBLE
|
||||
(findViewById(mRes.getIdentifier("week_num_$i", "id", mPackageName)) as TextView).apply {
|
||||
text = "${mDays!![i * 7].weekOfYear}:"
|
||||
setTextColor(mWeakTextColor)
|
||||
visibility = View.VISIBLE
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for (i in 0..len - 1) {
|
||||
val day = mDays!![i]
|
||||
val dayTV = findViewById(mRes.getIdentifier("day_" + i, "id", mPackageName)) as TextView?
|
||||
var curTextColor = mWeakTextColor
|
||||
var curTextSize = mDayTextSize
|
||||
|
||||
|
@ -190,9 +190,11 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
|
|||
curTextSize = mTodayTextSize
|
||||
}
|
||||
|
||||
dayTV!!.text = day.value.toString()
|
||||
dayTV.setTextColor(curTextColor)
|
||||
dayTV.textSize = curTextSize
|
||||
(findViewById(mRes.getIdentifier("day_$i", "id", mPackageName)) as TextView).apply {
|
||||
text = day.value.toString()
|
||||
setTextColor(curTextColor)
|
||||
textSize = curTextSize
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,9 +227,10 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
|
|||
|
||||
private fun updateLabels() {
|
||||
for (i in 0..6) {
|
||||
val dayTV = findViewById(mRes.getIdentifier("label_" + i, "id", mPackageName)) as TextView?
|
||||
dayTV!!.textSize = mDayTextSize
|
||||
dayTV.setTextColor(mTextColor)
|
||||
(findViewById(mRes.getIdentifier("label_$i", "id", mPackageName)) as TextView).apply {
|
||||
textSize = mDayTextSize
|
||||
setTextColor(mTextColor)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:layout_marginTop="@dimen/activity_margin"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.simplemobiletools.commons.views.MyFloatingActionButton
|
||||
android:id="@+id/day_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
android:layout_height="match_parent"
|
||||
android:visibility="gone"/>
|
||||
|
||||
<android.support.design.widget.FloatingActionButton
|
||||
<com.simplemobiletools.commons.views.MyFloatingActionButton
|
||||
android:id="@+id/calendar_fab"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
|
Loading…
Reference in New Issue