mirror of
https://github.com/SimpleMobileTools/Simple-Calendar.git
synced 2025-06-05 21:59:17 +02:00
update commons to 3.21.3
This commit is contained in:
@ -46,7 +46,7 @@ ext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.simplemobiletools:commons:3.21.2'
|
implementation 'com.simplemobiletools:commons:3.21.3'
|
||||||
implementation 'joda-time:joda-time:2.9.9'
|
implementation 'joda-time:joda-time:2.9.9'
|
||||||
implementation 'com.facebook.stetho:stetho:1.5.0'
|
implementation 'com.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'com.android.support:multidex:1.0.3'
|
implementation 'com.android.support:multidex:1.0.3'
|
||||||
|
@ -421,7 +421,7 @@ class EventActivity : SimpleActivity() {
|
|||||||
val eventType = dbHelper.getEventType(mEventTypeId)
|
val eventType = dbHelper.getEventType(mEventTypeId)
|
||||||
if (eventType != null) {
|
if (eventType != null) {
|
||||||
event_type.text = eventType.title
|
event_type.text = eventType.title
|
||||||
event_type_color.setBackgroundWithStroke(eventType.color, config.backgroundColor)
|
event_type_color.setFillWithStroke(eventType.color, config.backgroundColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,15 +107,19 @@ class WidgetListConfigureActivity : SimpleActivity() {
|
|||||||
|
|
||||||
private fun pickBackgroundColor() {
|
private fun pickBackgroundColor() {
|
||||||
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
||||||
mBgColorWithoutTransparency = color
|
if (wasPositivePressed) {
|
||||||
updateBgColor()
|
mBgColorWithoutTransparency = color
|
||||||
|
updateBgColor()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickTextColor() {
|
private fun pickTextColor() {
|
||||||
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
||||||
mTextColorWithoutTransparency = color
|
if (wasPositivePressed) {
|
||||||
updateColors()
|
mTextColorWithoutTransparency = color
|
||||||
|
updateColors()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ import com.simplemobiletools.commons.dialogs.ColorPickerDialog
|
|||||||
import com.simplemobiletools.commons.extensions.adjustAlpha
|
import com.simplemobiletools.commons.extensions.adjustAlpha
|
||||||
import com.simplemobiletools.commons.extensions.applyColorFilter
|
import com.simplemobiletools.commons.extensions.applyColorFilter
|
||||||
import com.simplemobiletools.commons.extensions.beVisible
|
import com.simplemobiletools.commons.extensions.beVisible
|
||||||
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import kotlinx.android.synthetic.main.first_row.*
|
import kotlinx.android.synthetic.main.first_row.*
|
||||||
import kotlinx.android.synthetic.main.top_navigation.*
|
import kotlinx.android.synthetic.main.top_navigation.*
|
||||||
import kotlinx.android.synthetic.main.widget_config_monthly.*
|
import kotlinx.android.synthetic.main.widget_config_monthly.*
|
||||||
@ -111,16 +112,20 @@ class WidgetMonthlyConfigureActivity : SimpleActivity(), MonthlyCalendar {
|
|||||||
|
|
||||||
private fun pickBackgroundColor() {
|
private fun pickBackgroundColor() {
|
||||||
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
||||||
mBgColorWithoutTransparency = color
|
if (wasPositivePressed) {
|
||||||
updateBgColor()
|
mBgColorWithoutTransparency = color
|
||||||
|
updateBgColor()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickTextColor() {
|
private fun pickTextColor() {
|
||||||
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
||||||
mTextColorWithoutTransparency = color
|
if (wasPositivePressed) {
|
||||||
updateColors()
|
mTextColorWithoutTransparency = color
|
||||||
updateDays()
|
updateColors()
|
||||||
|
updateDays()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import com.simplemobiletools.calendar.activities.SimpleActivity
|
|||||||
import com.simplemobiletools.calendar.extensions.config
|
import com.simplemobiletools.calendar.extensions.config
|
||||||
import com.simplemobiletools.calendar.models.EventType
|
import com.simplemobiletools.calendar.models.EventType
|
||||||
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
import com.simplemobiletools.commons.extensions.getAdjustedPrimaryColor
|
||||||
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.interfaces.MyAdapterListener
|
import com.simplemobiletools.commons.interfaces.MyAdapterListener
|
||||||
import kotlinx.android.synthetic.main.filter_event_type_view.view.*
|
import kotlinx.android.synthetic.main.filter_event_type_view.view.*
|
||||||
import java.util.*
|
import java.util.*
|
||||||
@ -73,7 +73,7 @@ class FilterEventTypeAdapter(val activity: SimpleActivity, val eventTypes: List<
|
|||||||
itemView.apply {
|
itemView.apply {
|
||||||
filter_event_type_checkbox.setColors(activity.config.textColor, activity.getAdjustedPrimaryColor(), 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_checkbox.text = eventType.getDisplayTitle()
|
||||||
filter_event_type_color.setBackgroundWithStroke(eventType.color, activity.config.backgroundColor)
|
filter_event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor)
|
||||||
filter_event_type_holder.setOnClickListener { viewClicked(!filter_event_type_checkbox.isChecked) }
|
filter_event_type_holder.setOnClickListener { viewClicked(!filter_event_type_checkbox.isChecked) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ import com.simplemobiletools.calendar.models.EventType
|
|||||||
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
|
import com.simplemobiletools.commons.adapters.MyRecyclerViewAdapter
|
||||||
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
import com.simplemobiletools.commons.dialogs.ConfirmationDialog
|
||||||
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
import com.simplemobiletools.commons.dialogs.RadioGroupDialog
|
||||||
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
import com.simplemobiletools.commons.extensions.toast
|
||||||
import com.simplemobiletools.commons.models.RadioItem
|
import com.simplemobiletools.commons.models.RadioItem
|
||||||
import com.simplemobiletools.commons.views.MyRecyclerView
|
import com.simplemobiletools.commons.views.MyRecyclerView
|
||||||
@ -60,7 +60,7 @@ class ManageEventTypesAdapter(activity: SimpleActivity, val eventTypes: ArrayLis
|
|||||||
private fun setupView(view: View, eventType: EventType) {
|
private fun setupView(view: View, eventType: EventType) {
|
||||||
view.apply {
|
view.apply {
|
||||||
event_type_title.text = eventType.getDisplayTitle()
|
event_type_title.text = eventType.getDisplayTitle()
|
||||||
event_type_color.setBackgroundWithStroke(eventType.color, activity.config.backgroundColor)
|
event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor)
|
||||||
event_type_title.setTextColor(textColor)
|
event_type_title.setTextColor(textColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ import com.simplemobiletools.calendar.extensions.dbHelper
|
|||||||
import com.simplemobiletools.calendar.helpers.DBHelper
|
import com.simplemobiletools.calendar.helpers.DBHelper
|
||||||
import com.simplemobiletools.calendar.helpers.IcsImporter
|
import com.simplemobiletools.calendar.helpers.IcsImporter
|
||||||
import com.simplemobiletools.calendar.helpers.IcsImporter.ImportResult.*
|
import com.simplemobiletools.calendar.helpers.IcsImporter.ImportResult.*
|
||||||
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import com.simplemobiletools.commons.extensions.toast
|
import com.simplemobiletools.commons.extensions.toast
|
||||||
import kotlinx.android.synthetic.main.dialog_import_events.view.*
|
import kotlinx.android.synthetic.main.dialog_import_events.view.*
|
||||||
@ -50,7 +50,7 @@ class ImportEventsDialog(val activity: SimpleActivity, val path: String, val cal
|
|||||||
private fun updateEventType(view: ViewGroup) {
|
private fun updateEventType(view: ViewGroup) {
|
||||||
val eventType = activity.dbHelper.getEventType(currEventTypeId)
|
val eventType = activity.dbHelper.getEventType(currEventTypeId)
|
||||||
view.import_event_type_title.text = eventType!!.getDisplayTitle()
|
view.import_event_type_title.text = eventType!!.getDisplayTitle()
|
||||||
view.import_event_type_color.setBackgroundWithStroke(eventType.color, activity.config.backgroundColor)
|
view.import_event_type_color.setFillWithStroke(eventType.color, activity.config.backgroundColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleParseResult(result: IcsImporter.ImportResult) {
|
private fun handleParseResult(result: IcsImporter.ImportResult) {
|
||||||
|
@ -11,7 +11,7 @@ import com.simplemobiletools.calendar.extensions.config
|
|||||||
import com.simplemobiletools.calendar.extensions.dbHelper
|
import com.simplemobiletools.calendar.extensions.dbHelper
|
||||||
import com.simplemobiletools.calendar.helpers.STORED_LOCALLY_ONLY
|
import com.simplemobiletools.calendar.helpers.STORED_LOCALLY_ONLY
|
||||||
import com.simplemobiletools.calendar.models.CalDAVCalendar
|
import com.simplemobiletools.calendar.models.CalDAVCalendar
|
||||||
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
import kotlinx.android.synthetic.main.dialog_select_radio_group.view.*
|
import kotlinx.android.synthetic.main.dialog_select_radio_group.view.*
|
||||||
@ -52,7 +52,7 @@ class SelectEventCalendarDialog(val activity: Activity, val calendars: List<CalD
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (color != Color.TRANSPARENT)
|
if (color != Color.TRANSPARENT)
|
||||||
view.dialog_radio_color.setBackgroundWithStroke(color, activity.config.backgroundColor)
|
view.dialog_radio_color.setFillWithStroke(color, activity.config.backgroundColor)
|
||||||
|
|
||||||
view.setOnClickListener { viewClicked(typeId) }
|
view.setOnClickListener { viewClicked(typeId) }
|
||||||
radioGroup.addView(view, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
|
radioGroup.addView(view, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
|
||||||
|
@ -10,7 +10,7 @@ import com.simplemobiletools.calendar.R
|
|||||||
import com.simplemobiletools.calendar.extensions.config
|
import com.simplemobiletools.calendar.extensions.config
|
||||||
import com.simplemobiletools.calendar.helpers.CalDAVHandler
|
import com.simplemobiletools.calendar.helpers.CalDAVHandler
|
||||||
import com.simplemobiletools.calendar.models.EventType
|
import com.simplemobiletools.calendar.models.EventType
|
||||||
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import kotlinx.android.synthetic.main.dialog_select_radio_group.view.*
|
import kotlinx.android.synthetic.main.dialog_select_radio_group.view.*
|
||||||
import kotlinx.android.synthetic.main.radio_button_with_color.view.*
|
import kotlinx.android.synthetic.main.radio_button_with_color.view.*
|
||||||
@ -45,7 +45,7 @@ class SelectEventTypeColorDialog(val activity: Activity, val eventType: EventTyp
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (color != Color.TRANSPARENT)
|
if (color != Color.TRANSPARENT)
|
||||||
view.dialog_radio_color.setBackgroundWithStroke(color, activity.config.backgroundColor)
|
view.dialog_radio_color.setFillWithStroke(color, activity.config.backgroundColor)
|
||||||
|
|
||||||
view.setOnClickListener { viewClicked(colorKey) }
|
view.setOnClickListener { viewClicked(colorKey) }
|
||||||
radioGroup.addView(view, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
|
radioGroup.addView(view, RadioGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.WRAP_CONTENT))
|
||||||
|
@ -10,7 +10,7 @@ import com.simplemobiletools.calendar.extensions.config
|
|||||||
import com.simplemobiletools.calendar.extensions.dbHelper
|
import com.simplemobiletools.calendar.extensions.dbHelper
|
||||||
import com.simplemobiletools.calendar.models.EventType
|
import com.simplemobiletools.calendar.models.EventType
|
||||||
import com.simplemobiletools.commons.extensions.hideKeyboard
|
import com.simplemobiletools.commons.extensions.hideKeyboard
|
||||||
import com.simplemobiletools.commons.extensions.setBackgroundWithStroke
|
import com.simplemobiletools.commons.extensions.setFillWithStroke
|
||||||
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
import com.simplemobiletools.commons.extensions.setupDialogStuff
|
||||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||||
import com.simplemobiletools.commons.views.MyCompatRadioButton
|
import com.simplemobiletools.commons.views.MyCompatRadioButton
|
||||||
@ -59,7 +59,7 @@ class SelectEventTypeDialog(val activity: Activity, val currEventType: Int, val
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (eventType.color != Color.TRANSPARENT) {
|
if (eventType.color != Color.TRANSPARENT) {
|
||||||
view.dialog_radio_color.setBackgroundWithStroke(eventType.color, activity.config.backgroundColor)
|
view.dialog_radio_color.setFillWithStroke(eventType.color, activity.config.backgroundColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
view.setOnClickListener { viewClicked(eventType) }
|
view.setOnClickListener { viewClicked(eventType) }
|
||||||
|
@ -24,8 +24,10 @@ class UpdateEventTypeDialog(val activity: Activity, var eventType: EventType? =
|
|||||||
type_color.setOnClickListener {
|
type_color.setOnClickListener {
|
||||||
if (eventType?.caldavCalendarId == 0) {
|
if (eventType?.caldavCalendarId == 0) {
|
||||||
ColorPickerDialog(activity, eventType!!.color) { wasPositivePressed, color ->
|
ColorPickerDialog(activity, eventType!!.color) { wasPositivePressed, color ->
|
||||||
eventType!!.color = color
|
if (wasPositivePressed) {
|
||||||
setupColor(type_color)
|
eventType!!.color = color
|
||||||
|
setupColor(type_color)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SelectEventTypeColorDialog(activity, eventType!!) {
|
SelectEventTypeColorDialog(activity, eventType!!) {
|
||||||
@ -79,6 +81,6 @@ class UpdateEventTypeDialog(val activity: Activity, var eventType: EventType? =
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun setupColor(view: ImageView) {
|
private fun setupColor(view: ImageView) {
|
||||||
view.setBackgroundWithStroke(eventType!!.color, activity.config.backgroundColor)
|
view.setFillWithStroke(eventType!!.color, activity.config.backgroundColor)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user