mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-02-17 03:50:39 +01:00
update commons to 3.17.24
This commit is contained in:
parent
7b9c99b228
commit
d388cd0fc4
@ -43,13 +43,13 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:3.13.16'
|
||||
implementation 'com.simplemobiletools:commons:3.17.24'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.robolectric:robolectric:3.5.1'
|
||||
|
||||
androidTestImplementation 'com.android.support:support-annotations:27.0.2'
|
||||
androidTestImplementation 'com.android.support:support-annotations:27.1.0'
|
||||
androidTestImplementation 'com.android.support.test:runner:1.0.1'
|
||||
androidTestImplementation 'com.android.support.test:rules:1.0.1'
|
||||
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
|
||||
|
@ -15,7 +15,6 @@ import com.simplemobiletools.calculator.helpers.*
|
||||
import com.simplemobiletools.commons.extensions.*
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_AUTOFITTEXTVIEW
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_ESPRESSO
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_KOTLIN
|
||||
import com.simplemobiletools.commons.helpers.LICENSE_ROBOLECTRIC
|
||||
import com.simplemobiletools.commons.models.FAQItem
|
||||
import com.simplemobiletools.commons.models.Release
|
||||
@ -25,7 +24,6 @@ import me.grantland.widget.AutofitHelper
|
||||
class MainActivity : SimpleActivity(), Calculator {
|
||||
private var storedTextColor = 0
|
||||
private var vibrateOnButtonPress = true
|
||||
private var storedUseEnglish = false
|
||||
|
||||
lateinit var calc: CalculatorImpl
|
||||
|
||||
@ -64,11 +62,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
||||
|
||||
override fun onResume() {
|
||||
super.onResume()
|
||||
if (storedUseEnglish != config.useEnglish) {
|
||||
restartActivity()
|
||||
return
|
||||
}
|
||||
|
||||
if (storedTextColor != config.textColor) {
|
||||
updateViewColors(calculator_holder, config.textColor)
|
||||
}
|
||||
@ -105,7 +98,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
||||
private fun storeStateVariables() {
|
||||
config.apply {
|
||||
storedTextColor = textColor
|
||||
storedUseEnglish = useEnglish
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,11 +114,11 @@ class MainActivity : SimpleActivity(), Calculator {
|
||||
private fun launchAbout() {
|
||||
val faqItems = arrayListOf(
|
||||
FAQItem(R.string.faq_1_title_commons, R.string.faq_1_text_commons),
|
||||
FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons),
|
||||
FAQItem(R.string.faq_4_title_commons, R.string.faq_4_text_commons)
|
||||
FAQItem(R.string.faq_4_title_commons, R.string.faq_4_text_commons),
|
||||
FAQItem(R.string.faq_2_title_commons, R.string.faq_2_text_commons)
|
||||
)
|
||||
|
||||
startAboutActivity(R.string.app_name, LICENSE_KOTLIN or LICENSE_AUTOFITTEXTVIEW or LICENSE_ROBOLECTRIC or LICENSE_ESPRESSO, BuildConfig.VERSION_NAME, faqItems)
|
||||
startAboutActivity(R.string.app_name, LICENSE_AUTOFITTEXTVIEW or LICENSE_ROBOLECTRIC or LICENSE_ESPRESSO, BuildConfig.VERSION_NAME, faqItems)
|
||||
}
|
||||
|
||||
private fun getButtonIds() = arrayOf(btn_decimal, btn_0, btn_1, btn_2, btn_3, btn_4, btn_5, btn_6, btn_7, btn_8, btn_9)
|
||||
|
@ -5,7 +5,6 @@ import com.simplemobiletools.calculator.R
|
||||
import com.simplemobiletools.calculator.extensions.config
|
||||
import com.simplemobiletools.commons.extensions.beVisibleIf
|
||||
import com.simplemobiletools.commons.extensions.updateTextColors
|
||||
import com.simplemobiletools.commons.extensions.useEnglishToggled
|
||||
import kotlinx.android.synthetic.main.activity_settings.*
|
||||
import java.util.*
|
||||
|
||||
@ -39,7 +38,7 @@ class SettingsActivity : SimpleActivity() {
|
||||
settings_use_english_holder.setOnClickListener {
|
||||
settings_use_english.toggle()
|
||||
config.useEnglish = settings_use_english.isChecked
|
||||
useEnglishToggled()
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -7,8 +7,4 @@ class Config(context: Context) : BaseConfig(context) {
|
||||
companion object {
|
||||
fun newInstance(context: Context) = Config(context)
|
||||
}
|
||||
|
||||
var vibrateOnButtonPress: Boolean
|
||||
get() = prefs.getBoolean(VIBRATE_ON_BUTTON_PRESS, true)
|
||||
set(vibrateOnButton) = prefs.edit().putBoolean(VIBRATE_ON_BUTTON_PRESS, vibrateOnButton).apply()
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.2.21'
|
||||
ext.kotlin_version = '1.2.31'
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
@ -9,7 +9,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:3.0.1'
|
||||
classpath 'com.android.tools.build:gradle:3.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
Loading…
x
Reference in New Issue
Block a user