mirror of
https://github.com/SimpleMobileTools/Simple-Clock.git
synced 2025-06-05 22:19:17 +02:00
update commons to 3.18.17
This commit is contained in:
@ -41,7 +41,7 @@ android {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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.facebook.stetho:stetho:1.5.0'
|
||||||
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
|
||||||
implementation 'com.shawnlin:number-picker:2.4.6'
|
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.*
|
import kotlinx.android.synthetic.main.activity_main.*
|
||||||
|
|
||||||
class MainActivity : SimpleActivity() {
|
class MainActivity : SimpleActivity() {
|
||||||
private var storedUseEnglish = false
|
|
||||||
private var storedTextColor = 0
|
private var storedTextColor = 0
|
||||||
private var storedBackgroundColor = 0
|
private var storedBackgroundColor = 0
|
||||||
private var storedPrimaryColor = 0
|
private var storedPrimaryColor = 0
|
||||||
@ -48,11 +47,6 @@ class MainActivity : SimpleActivity() {
|
|||||||
|
|
||||||
override fun onResume() {
|
override fun onResume() {
|
||||||
super.onResume()
|
super.onResume()
|
||||||
if (storedUseEnglish != config.useEnglish) {
|
|
||||||
restartActivity()
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
val configTextColor = config.textColor
|
val configTextColor = config.textColor
|
||||||
if (storedTextColor != configTextColor) {
|
if (storedTextColor != configTextColor) {
|
||||||
getInactiveTabIndexes(view_pager.currentItem).forEach {
|
getInactiveTabIndexes(view_pager.currentItem).forEach {
|
||||||
@ -114,7 +108,6 @@ class MainActivity : SimpleActivity() {
|
|||||||
storedTextColor = textColor
|
storedTextColor = textColor
|
||||||
storedBackgroundColor = backgroundColor
|
storedBackgroundColor = backgroundColor
|
||||||
storedPrimaryColor = primaryColor
|
storedPrimaryColor = primaryColor
|
||||||
storedUseEnglish = useEnglish
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class SettingsActivity : SimpleActivity() {
|
|||||||
settings_use_english_holder.setOnClickListener {
|
settings_use_english_holder.setOnClickListener {
|
||||||
settings_use_english.toggle()
|
settings_use_english.toggle()
|
||||||
config.useEnglish = settings_use_english.isChecked
|
config.useEnglish = settings_use_english.isChecked
|
||||||
useEnglishToggled()
|
System.exit(0)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,15 +101,15 @@ class WidgetDateTimeConfigureActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun pickBackgroundColor() {
|
private fun pickBackgroundColor() {
|
||||||
ColorPickerDialog(this, mBgColorWithoutTransparency) {
|
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
|
||||||
mBgColorWithoutTransparency = it
|
mBgColorWithoutTransparency = color
|
||||||
updateBgColor()
|
updateBgColor()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun pickTextColor() {
|
private fun pickTextColor() {
|
||||||
ColorPickerDialog(this, mTextColor) {
|
ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
|
||||||
mTextColorWithoutTransparency = it
|
mTextColorWithoutTransparency = color
|
||||||
updateColors()
|
updateColors()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,10 @@ class AlarmsAdapter(activity: SimpleActivity, var alarms: ArrayList<Alarm>, val
|
|||||||
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) {
|
recyclerView: MyRecyclerView, itemClick: (Any) -> Unit) : MyRecyclerViewAdapter(activity, recyclerView, null, itemClick) {
|
||||||
private val adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
private val adjustedPrimaryColor = activity.getAdjustedPrimaryColor()
|
||||||
|
|
||||||
|
init {
|
||||||
|
setupDragListener(true)
|
||||||
|
}
|
||||||
|
|
||||||
override fun getActionMenuId() = R.menu.cab_alarms
|
override fun getActionMenuId() = R.menu.cab_alarms
|
||||||
|
|
||||||
override fun prepareActionMode(menu: Menu) {}
|
override fun prepareActionMode(menu: Menu) {}
|
||||||
|
@ -21,6 +21,10 @@ class TimeZonesAdapter(activity: SimpleActivity, var timeZones: ArrayList<MyTime
|
|||||||
|
|
||||||
var todayDateString = activity.getFormattedDate(Calendar.getInstance())
|
var todayDateString = activity.getFormattedDate(Calendar.getInstance())
|
||||||
|
|
||||||
|
init {
|
||||||
|
setupDragListener(true)
|
||||||
|
}
|
||||||
|
|
||||||
override fun getActionMenuId() = R.menu.cab_timezones
|
override fun getActionMenuId() = R.menu.cab_timezones
|
||||||
|
|
||||||
override fun prepareActionMode(menu: Menu) {}
|
override fun prepareActionMode(menu: Menu) {}
|
||||||
|
@ -19,8 +19,8 @@ class AddTimeZonesDialog(val activity: SimpleActivity, private val callback: ()
|
|||||||
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
.setPositiveButton(R.string.ok, { dialog, which -> dialogConfirmed() })
|
||||||
.setNegativeButton(R.string.cancel, null)
|
.setNegativeButton(R.string.cancel, null)
|
||||||
.create().apply {
|
.create().apply {
|
||||||
activity.setupDialogStuff(view, this)
|
activity.setupDialogStuff(view, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun dialogConfirmed() {
|
private fun dialogConfirmed() {
|
||||||
|
@ -72,7 +72,6 @@ class AlarmFragment : Fragment(), ToggleAlarmInterface {
|
|||||||
AlarmsAdapter(activity as SimpleActivity, alarms, this, view.alarms_list) {
|
AlarmsAdapter(activity as SimpleActivity, alarms, this, view.alarms_list) {
|
||||||
openEditAlarm(it as Alarm)
|
openEditAlarm(it as Alarm)
|
||||||
}.apply {
|
}.apply {
|
||||||
setupDragListener(true)
|
|
||||||
view.alarms_list.adapter = this
|
view.alarms_list.adapter = this
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -125,7 +125,6 @@ class ClockFragment : Fragment() {
|
|||||||
updateTimeZones()
|
updateTimeZones()
|
||||||
}
|
}
|
||||||
}.apply {
|
}.apply {
|
||||||
setupDragListener(true)
|
|
||||||
view.time_zones_list.adapter = this
|
view.time_zones_list.adapter = this
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
Reference in New Issue
Block a user