update Commons, min OS to 5

This commit is contained in:
tibbi 2018-10-19 18:14:18 +02:00
parent 8255823400
commit 4a81aeebbc
8 changed files with 11 additions and 22 deletions

1
.gitignore vendored
View File

@ -1,7 +1,6 @@
*.iml
.gradle
/local.properties
/gradle.properties
/.idea/
.DS_Store
/build

View File

@ -8,7 +8,7 @@ android {
defaultConfig {
applicationId "com.simplemobiletools.calculator"
minSdkVersion 16
minSdkVersion 21
targetSdkVersion 28
versionCode 22
versionName "4.2.0"
@ -43,16 +43,16 @@ android {
}
dependencies {
implementation 'com.simplemobiletools:commons:4.9.1'
implementation 'com.simplemobiletools:commons:5.1.4'
implementation 'me.grantland:autofittextview:0.2.1'
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.8'
androidTestImplementation 'androidx.annotation:annotation:1.0.0'
androidTestImplementation 'androidx.test:runner:1.1.0-beta01'
androidTestImplementation 'androidx.test:rules:1.1.0-beta01'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-beta01'
androidTestImplementation 'androidx.test:runner:1.1.0-beta02'
androidTestImplementation 'androidx.test:rules:1.1.0-beta02'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-beta02'
}
Properties props = new Properties()

View File

@ -112,6 +112,7 @@ class MainActivity : SimpleActivity(), Calculator {
private fun launchSettings() {
startActivity(Intent(applicationContext, SettingsActivity::class.java))
}
private fun launchScientific() {
startActivity(Intent(applicationContext, ScientificActivity::class.java))
}

View File

@ -111,7 +111,7 @@ class WidgetConfigureActivity : SimpleActivity() {
config_save.setTextColor(mTextColor)
val viewIds = intArrayOf(R.id.btn_0, R.id.btn_1, R.id.btn_2, R.id.btn_3, R.id.btn_4, R.id.btn_5, R.id.btn_6, R.id.btn_7, R.id.btn_8,
R.id.btn_9, R.id.btn_percent, R.id.btn_power, R.id.btn_root, R.id.btn_factorial, R.id.btn_clear, R.id.btn_reset, R.id.btn_divide, R.id.btn_multiply,
R.id.btn_9, R.id.btn_percent, R.id.btn_power, R.id.btn_root, R.id.btn_clear, R.id.btn_reset, R.id.btn_divide, R.id.btn_multiply,
R.id.btn_minus, R.id.btn_plus, R.id.btn_decimal, R.id.btn_equals)
result.setTextColor(mTextColor)
formula.setTextColor(mTextColor)

View File

@ -58,7 +58,7 @@ class CalculatorImpl(calculator: Calculator, val context: Context) {
if (sign == "") {
setFormula(sign + first)
} else if (sign == "!"){
} else if (sign == "!") {
setFormula(first + sign)
} else if (!sign.isEmpty()) {
var formula = first + sign + second
@ -125,7 +125,7 @@ class CalculatorImpl(calculator: Calculator, val context: Context) {
fun handleOperation(operation: String) {
mWasPercentLast = operation == PERCENT
if (lastKey == DIGIT && operation != ROOT && operation!= FACTORIAL) {
if (lastKey == DIGIT && operation != ROOT && operation != FACTORIAL) {
handleResult()
}

View File

@ -1,11 +0,0 @@
<resources>
<style name="MyButton" parent="Widget.AppCompat.Button">
<item name="android:textColor">@color/color_primary</item>
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
<item name="android:textSize">@dimen/button_text_size</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:textAllCaps">false</item>
</style>
</resources>

View File

@ -3,7 +3,7 @@
<style name="AppTheme" parent="AppTheme.Base"/>
<style name="MyButton" parent="Widget.AppCompat.Button">
<item name="android:background">@drawable/button</item>
<item name="android:background">?android:attr/selectableItemBackgroundBorderless</item>
<item name="android:textSize">@dimen/button_text_size</item>
<item name="android:fontFamily">sans-serif-light</item>
<item name="android:textAllCaps">false</item>

View File

@ -9,7 +9,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.android.tools.build:gradle:3.2.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong