mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-03-10 16:30:14 +01:00
Merge branch 'master' into patch-1
This commit is contained in:
commit
438219f6ab
app
build.gradlegradle/wrapper
@ -57,7 +57,7 @@ android {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.simplemobiletools:commons:5.30.1'
|
||||
implementation 'com.simplemobiletools:commons:5.31.24'
|
||||
implementation 'me.grantland:autofittextview:0.2.1'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
|
@ -12,6 +12,10 @@
|
||||
android:name="android.permission.USE_FINGERPRINT"
|
||||
tools:node="remove"/>
|
||||
|
||||
<uses-feature
|
||||
android:name="android.hardware.faketouch"
|
||||
android:required="false"/>
|
||||
|
||||
<application
|
||||
android:name=".App"
|
||||
android:allowBackup="true"
|
||||
|
@ -1,7 +1,6 @@
|
||||
package com.simplemobiletools.calculator.helpers
|
||||
|
||||
import android.content.Context
|
||||
import android.util.Log
|
||||
import com.simplemobiletools.calculator.R
|
||||
import com.simplemobiletools.calculator.operation.OperationFactory
|
||||
import com.simplemobiletools.commons.extensions.toast
|
||||
@ -124,10 +123,13 @@ class CalculatorImpl(calculator: Calculator, val context: Context) {
|
||||
if (update) updateFormula()
|
||||
|
||||
val operation = OperationFactory.forId(lastOperation!!, baseValue, secondValue)
|
||||
Log.i("ANGELINA", "oper $lastOperation")
|
||||
if (operation != null) {
|
||||
updateResult(operation.getResult())
|
||||
inputDisplayedFormula = displayedNumber
|
||||
try {
|
||||
updateResult(operation.getResult())
|
||||
inputDisplayedFormula = displayedNumber
|
||||
} catch (e: Exception) {
|
||||
context.toast(R.string.unknown_error_occurred)
|
||||
}
|
||||
}
|
||||
|
||||
isFirstOperation = false
|
||||
|
@ -15,6 +15,7 @@
|
||||
android:layout_weight="2.1"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="end|bottom"
|
||||
android:maxLength="30"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
@ -27,6 +28,7 @@
|
||||
android:layout_weight="1.8"
|
||||
android:fontFamily="sans-serif-light"
|
||||
android:gravity="center_vertical|end"
|
||||
android:maxLength="20"
|
||||
android:maxLines="1"
|
||||
android:paddingLeft="@dimen/activity_margin"
|
||||
android:paddingRight="@dimen/activity_margin"
|
||||
|
@ -1,14 +1,14 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
|
||||
buildscript {
|
||||
ext.kotlin_version = '1.4.0'
|
||||
ext.kotlin_version = '1.4.10'
|
||||
repositories {
|
||||
google()
|
||||
jcenter()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.0.1'
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
|
||||
// NOTE: Do not place your application dependencies here; they belong
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Mon Aug 17 22:55:20 CEST 2020
|
||||
#Thu Nov 05 21:17:11 CET 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
|
||||
|
Loading…
x
Reference in New Issue
Block a user