update commons to 3.18.17

This commit is contained in:
tibbi 2018-04-11 10:58:38 +02:00
parent 329560d21e
commit 820f4ac256
9 changed files with 16 additions and 17 deletions

View File

@ -41,7 +41,7 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:3.17.14'
implementation 'com.simplemobiletools:commons:3.18.17'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.shawnlin:number-picker:2.4.6'

View File

@ -23,7 +23,6 @@ import com.simplemobiletools.commons.models.FAQItem
import kotlinx.android.synthetic.main.activity_main.*
class MainActivity : SimpleActivity() {
private var storedUseEnglish = false
private var storedTextColor = 0
private var storedBackgroundColor = 0
private var storedPrimaryColor = 0
@ -48,11 +47,6 @@ class MainActivity : SimpleActivity() {
override fun onResume() {
super.onResume()
if (storedUseEnglish != config.useEnglish) {
restartActivity()
return
}
val configTextColor = config.textColor
if (storedTextColor != configTextColor) {
getInactiveTabIndexes(view_pager.currentItem).forEach {
@ -114,7 +108,6 @@ class MainActivity : SimpleActivity() {
storedTextColor = textColor
storedBackgroundColor = backgroundColor
storedPrimaryColor = primaryColor
storedUseEnglish = useEnglish
}
}

View File

@ -56,7 +56,7 @@ class SettingsActivity : SimpleActivity() {
settings_use_english_holder.setOnClickListener {
settings_use_english.toggle()
config.useEnglish = settings_use_english.isChecked
useEnglishToggled()
System.exit(0)
}
}

View File

@ -101,15 +101,15 @@ class WidgetDateTimeConfigureActivity : SimpleActivity() {
}
private fun pickBackgroundColor() {
ColorPickerDialog(this, mBgColorWithoutTransparency) {
mBgColorWithoutTransparency = it
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
mBgColorWithoutTransparency = color
updateBgColor()
}
}
private fun pickTextColor() {
ColorPickerDialog(this, mTextColor) {
mTextColorWithoutTransparency = it
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
mTextColorWithoutTransparency = color
updateColors()
}
}

View File

@ -22,6 +22,10 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) {
private val adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
init {
setupDragListener(true)
}
override fun getActionMenuId() = R.menu.cab_alarms
override fun prepareActionMode(menu: Menu) {}

View File

@ -21,6 +21,10 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
var todayDateString = activity.getFormattedDate(Calendar.getInstance())
init {
setupDragListener(true)
}
override fun getActionMenuId() = R.menu.cab_timezones
override fun prepareActionMode(menu: Menu) {}

View File

@ -19,8 +19,8 @@ class AddTimeZonesDialog(val activity: SimpleActivity, private val callback: ()
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
.setNegativeButton(R.string.cancel, null)
.create().apply {
activity.setupDialogStuff(view, this)
}
activity.setupDialogStuff(view, this)
}
}
private fun dialogConfirmed() {

View File

@ -72,7 +72,6 @@ class AlarmFragment : Fragment(), ToggleAlarmInterface {
AlarmsAdapter(activity as SimpleActivity, alarms, this, view.alarms_list) {
openEditAlarm(it as Alarm)
}.apply {
setupDragListener(true)
view.alarms_list.adapter = this
}
} else {

View File

@ -125,7 +125,6 @@ class ClockFragment : Fragment() {
updateTimeZones()
}
}.apply {
setupDragListener(true)
view.time_zones_list.adapter = this
}
} else {