mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2024-12-14 17:33:58 +01:00
update commons to 3.18.17
This commit is contained in:
parent
329560d21e
commit
820f4ac256
@ -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'
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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) {}
|
||||
|
@ -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) {}
|
||||
|
@ -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() {
|
||||
|
@ -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 {
|
||||
|
@ -125,7 +125,6 @@ class ClockFragment : Fragment() {
|
||||
updateTimeZones()
|
||||
}
|
||||
}.apply {
|
||||
setupDragListener(true)
|
||||
view.time_zones_list.adapter = this
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user