update Commons to 2.3.0

This commit is contained in:
tibbi 2017-01-09 22:32:10 +01:00
parent 36f30cfdef
commit b2367ef9b6
5 changed files with 23 additions and 44 deletions

View File

@ -32,7 +32,7 @@ android {
} }
dependencies { dependencies {
compile 'com.simplemobiletools:commons:2.2.3' compile 'com.simplemobiletools:commons:2.3.0'
compile 'joda-time:joda-time:2.9.1' compile 'joda-time:joda-time:2.9.1'
compile 'com.facebook.stetho:stetho:1.4.1' compile 'com.facebook.stetho:stetho:1.4.1'
compile 'com.bignerdranch.android:recyclerview-multiselect:0.2' compile 'com.bignerdranch.android:recyclerview-multiselect:0.2'

View File

@ -19,7 +19,6 @@ import com.simplemobiletools.calendar.helpers.*
import com.simplemobiletools.calendar.helpers.Formatter import com.simplemobiletools.calendar.helpers.Formatter
import com.simplemobiletools.commons.extensions.checkWhatsNew import com.simplemobiletools.commons.extensions.checkWhatsNew
import com.simplemobiletools.commons.extensions.updateTextColors 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_JODA
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
import com.simplemobiletools.commons.helpers.LICENSE_STETHO import com.simplemobiletools.commons.helpers.LICENSE_STETHO
@ -119,7 +118,7 @@ class MainActivity : SimpleActivity(), EventListFragment.DeleteListener {
} }
private fun launchAbout() { 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() { private fun addNewEvent() {

View File

@ -16,10 +16,10 @@ import com.simplemobiletools.calendar.helpers.MyWidgetListProvider
import com.simplemobiletools.calendar.models.ListEvent import com.simplemobiletools.calendar.models.ListEvent
import com.simplemobiletools.calendar.models.ListItem import com.simplemobiletools.calendar.models.ListItem
import com.simplemobiletools.calendar.models.ListSection import com.simplemobiletools.calendar.models.ListSection
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.adjustAlpha import com.simplemobiletools.commons.extensions.adjustAlpha
import kotlinx.android.synthetic.main.widget_config_list.* import kotlinx.android.synthetic.main.widget_config_list.*
import org.joda.time.DateTime import org.joda.time.DateTime
import yuku.ambilwarna.AmbilWarnaDialog
import java.util.* import java.util.*
class WidgetListConfigureActivity : AppCompatActivity() { class WidgetListConfigureActivity : AppCompatActivity() {
@ -98,27 +98,17 @@ class WidgetListConfigureActivity : AppCompatActivity() {
} }
fun pickBackgroundColor() { fun pickBackgroundColor() {
AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener { ColorPickerDialog(this, mBgColorWithoutTransparency) {
override fun onCancel(dialog: AmbilWarnaDialog) { mBgColorWithoutTransparency = it
} updateBgColor()
}
override fun onOk(dialog: AmbilWarnaDialog, color: Int) {
mBgColorWithoutTransparency = color
updateBgColor()
}
}).show()
} }
fun pickTextColor() { fun pickTextColor() {
AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener { ColorPickerDialog(this, mTextColor) {
override fun onCancel(dialog: AmbilWarnaDialog) { mTextColorWithoutTransparency = it
} updateTextColors()
}
override fun onOk(dialog: AmbilWarnaDialog, color: Int) {
mTextColorWithoutTransparency = color
updateTextColors()
}
}).show()
} }
private fun requestWidgetUpdate() { private fun requestWidgetUpdate() {

View File

@ -12,20 +12,20 @@ import android.support.v7.app.AppCompatActivity
import android.view.View import android.view.View
import android.widget.SeekBar import android.widget.SeekBar
import android.widget.TextView import android.widget.TextView
import com.simplemobiletools.calendar.helpers.MonthlyCalendarImpl
import com.simplemobiletools.calendar.R import com.simplemobiletools.calendar.R
import com.simplemobiletools.calendar.extensions.removeUnderlineFlag import com.simplemobiletools.calendar.extensions.removeUnderlineFlag
import com.simplemobiletools.calendar.helpers.Config import com.simplemobiletools.calendar.helpers.Config
import com.simplemobiletools.calendar.helpers.LOW_ALPHA import com.simplemobiletools.calendar.helpers.LOW_ALPHA
import com.simplemobiletools.calendar.helpers.MonthlyCalendarImpl
import com.simplemobiletools.calendar.helpers.MyWidgetMonthlyProvider import com.simplemobiletools.calendar.helpers.MyWidgetMonthlyProvider
import com.simplemobiletools.calendar.interfaces.MonthlyCalendar import com.simplemobiletools.calendar.interfaces.MonthlyCalendar
import com.simplemobiletools.calendar.models.Day import com.simplemobiletools.calendar.models.Day
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.adjustAlpha import com.simplemobiletools.commons.extensions.adjustAlpha
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.*
import org.joda.time.DateTime import org.joda.time.DateTime
import yuku.ambilwarna.AmbilWarnaDialog
class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar { class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
lateinit var mRes: Resources lateinit var mRes: Resources
@ -101,28 +101,18 @@ class WidgetMonthlyConfigureActivity : AppCompatActivity(), MonthlyCalendar {
} }
fun pickBackgroundColor() { fun pickBackgroundColor() {
AmbilWarnaDialog(this, mBgColorWithoutTransparency, object : AmbilWarnaDialog.OnAmbilWarnaListener { ColorPickerDialog(this, mBgColorWithoutTransparency) {
override fun onCancel(dialog: AmbilWarnaDialog) { mBgColorWithoutTransparency = it
} updateBgColor()
}
override fun onOk(dialog: AmbilWarnaDialog, color: Int) {
mBgColorWithoutTransparency = color
updateBgColor()
}
}).show()
} }
fun pickTextColor() { fun pickTextColor() {
AmbilWarnaDialog(this, mTextColor, object : AmbilWarnaDialog.OnAmbilWarnaListener { ColorPickerDialog(this, mTextColor) {
override fun onCancel(dialog: AmbilWarnaDialog) { mTextColorWithoutTransparency = it
} updateTextColors()
updateDays()
override fun onOk(dialog: AmbilWarnaDialog, color: Int) { }
mTextColorWithoutTransparency = color
updateTextColors()
updateDays()
}
}).show()
} }
private fun requestWidgetUpdate() { private fun requestWidgetUpdate() {

View File

@ -25,7 +25,7 @@
<string name="past_event_added">Событие в прошлом успешно создано</string> <string name="past_event_added">Событие в прошлом успешно создано</string>
<string name="event_updated">Событие успешно обновлено</string> <string name="event_updated">Событие успешно обновлено</string>
<string name="reminder">Напоминание</string> <string name="reminder">Напоминание</string>
<string name="off">Отключено<string> <string name="off">Отключено</string>
<string name="at_start">С наступлением события</string> <string name="at_start">С наступлением события</string>
<string name="custom">Настраиваемое</string> <string name="custom">Настраиваемое</string>
<string name="repetition">Повторять</string> <string name="repetition">Повторять</string>