diff --git a/app/build.gradle b/app/build.gradle index b5fc784f2..6d10e78a8 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -32,7 +32,7 @@ android { } dependencies { - compile 'com.simplemobiletools:commons:2.2.3' + compile 'com.simplemobiletools:commons:2.3.0' compile 'joda-time:joda-time:2.9.1' compile 'com.facebook.stetho:stetho:1.4.1' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt index 1292f21be..06e17cda2 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/MainActivity.kt @@ -19,7 +19,6 @@ import com.simplemobiletools.calendar.helpers.* import com.simplemobiletools.calendar.helpers.Formatter import com.simplemobiletools.commons.extensions.checkWhatsNew 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 import com.simplemobiletools.commons.helpers.LICENSE_STETHO @@ -119,7 +118,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener { } private fun launchAbout() { - startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_AMBILWARNA or LICENSE_JODA or LICENSE_STETHO, BuildConfig.VERSION_NAME) + startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_JODA or LICENSE_STETHO, BuildConfig.VERSION_NAME) } private fun addNewEvent() { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetListConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetListConfigureActivity.kt index a6944a196..77ccb8edd 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetListConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetListConfigureActivity.kt @@ -16,10 +16,10 @@ import com.simplemobiletools.calendar.helpers.MyWidgetListProvider import com.simplemobiletools.calendar.models.ListEvent import com.simplemobiletools.calendar.models.ListItem import com.simplemobiletools.calendar.models.ListSection +import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.extensions.adjustAlpha import kotlinx.android.synthetic.main.widget_config_list.* import org.joda.time.DateTime -import yuku.ambilwarna.AmbilWarnaDialog import java.util.* class WidgetListConfigureActivity : AppCompatActivity() { @@ -98,27 +98,17 @@ class WidgetListConfigureActivity : AppCompatActivity() { } fun pickBackgroundColor() { - AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener { - override fun onCancel(dialog: AmbilWarnaDialog) { - } - - override fun onOk(dialog: AmbilWarnaDialog, color: Int) { - mBgColorWithoutTransparency = color - updateBgColor() - } - }).show() + ColorPickerDialog(this, mBgColorWithoutTransparency) { + mBgColorWithoutTransparency = it + updateBgColor() + } } fun pickTextColor() { - AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener { - override fun onCancel(dialog: AmbilWarnaDialog) { - } - - override fun onOk(dialog: AmbilWarnaDialog, color: Int) { - mTextColorWithoutTransparency = color - updateTextColors() - } - }).show() + ColorPickerDialog(this, mTextColor) { + mTextColorWithoutTransparency = it + updateTextColors() + } } private fun requestWidgetUpdate() { diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetMonthlyConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetMonthlyConfigureActivity.kt index 821f80b36..e68452507 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetMonthlyConfigureActivity.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/activities/WidgetMonthlyConfigureActivity.kt @@ -12,20 +12,20 @@ import android.support.v7.app.AppCompatActivity import android.view.View import android.widget.SeekBar import android.widget.TextView -import com.simplemobiletools.calendar.helpers.MonthlyCalendarImpl import com.simplemobiletools.calendar.R import com.simplemobiletools.calendar.extensions.removeUnderlineFlag import com.simplemobiletools.calendar.helpers.Config import com.simplemobiletools.calendar.helpers.LOW_ALPHA +import com.simplemobiletools.calendar.helpers.MonthlyCalendarImpl import com.simplemobiletools.calendar.helpers.MyWidgetMonthlyProvider import com.simplemobiletools.calendar.interfaces.MonthlyCalendar import com.simplemobiletools.calendar.models.Day +import com.simplemobiletools.commons.dialogs.ColorPickerDialog import com.simplemobiletools.commons.extensions.adjustAlpha import kotlinx.android.synthetic.main.first_row.* import kotlinx.android.synthetic.main.top_navigation.* import kotlinx.android.synthetic.main.widget_config_monthly.* import org.joda.time.DateTime -import yuku.ambilwarna.AmbilWarnaDialog class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar { lateinit var mRes: Resources @@ -101,28 +101,18 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar { } fun pickBackgroundColor() { - AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener { - override fun onCancel(dialog: AmbilWarnaDialog) { - } - - override fun onOk(dialog: AmbilWarnaDialog, color: Int) { - mBgColorWithoutTransparency = color - updateBgColor() - } - }).show() + ColorPickerDialog(this, mBgColorWithoutTransparency) { + mBgColorWithoutTransparency = it + updateBgColor() + } } fun pickTextColor() { - AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener { - override fun onCancel(dialog: AmbilWarnaDialog) { - } - - override fun onOk(dialog: AmbilWarnaDialog, color: Int) { - mTextColorWithoutTransparency = color - updateTextColors() - updateDays() - } - }).show() + ColorPickerDialog(this, mTextColor) { + mTextColorWithoutTransparency = it + updateTextColors() + updateDays() + } } private fun requestWidgetUpdate() { diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index c70628ea6..69f0957f0 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -25,7 +25,7 @@ Событие в прошлом успешно создано Событие успешно обновлено Напоминание - Отключено + Отключено С наступлением события Настраиваемое Повторять