remove empty lines
This commit is contained in:
parent
74071bee5a
commit
9734007b59
|
@ -29,12 +29,9 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
private var storedUseCommaAsDecimalMark = false
|
||||
private var decimalSeparator = DOT
|
||||
private var groupingSeparator = COMMA
|
||||
|
||||
private var saveCalculatorState: String = ""
|
||||
|
||||
private lateinit var calc: CalculatorImpl
|
||||
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
isMaterialActivity = true
|
||||
super.onCreate(savedInstanceState)
|
||||
|
@ -42,8 +39,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
appLaunched(BuildConfig.APPLICATION_ID)
|
||||
setupOptionsMenu()
|
||||
refreshMenuItems()
|
||||
|
||||
|
||||
updateMaterialActivityViews(main_coordinator, null, useTransparentNavigation = false, useTopSearchMenu = false)
|
||||
setupMaterialScrollListener(main_nested_scrollview, main_toolbar)
|
||||
|
||||
|
@ -52,8 +47,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
}
|
||||
|
||||
calc = CalculatorImpl(this, applicationContext, decimalSeparator, groupingSeparator, saveCalculatorState)
|
||||
|
||||
|
||||
btn_plus.setOnClickOperation(PLUS)
|
||||
btn_minus.setOnClickOperation(MINUS)
|
||||
btn_multiply.setOnClickOperation(MULTIPLY)
|
||||
|
@ -62,7 +55,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
btn_power.setOnClickOperation(POWER)
|
||||
btn_root.setOnClickOperation(ROOT)
|
||||
btn_minus.setOnLongClickListener { calc.turnToNegative() }
|
||||
|
||||
btn_clear.setVibratingOnClickListener { calc.handleClear() }
|
||||
btn_clear.setOnLongClickListener {
|
||||
calc.handleReset()
|
||||
|
@ -78,7 +70,6 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||
btn_equals.setVibratingOnClickListener { calc.handleEquals() }
|
||||
formula.setOnLongClickListener { copyToClipboard(false) }
|
||||
result.setOnLongClickListener { copyToClipboard(true) }
|
||||
|
||||
AutofitHelper.create(result)
|
||||
AutofitHelper.create(formula)
|
||||
storeStateVariables()
|
||||
|
|
|
@ -433,7 +433,6 @@ class CalculatorImpl(
|
|||
|
||||
private fun String.removeGroupSeparator() = formatter.removeGroupingSeparator(this)
|
||||
|
||||
|
||||
fun getCalculatorStateJson(): JSONObject {
|
||||
val jsonObj = JSONObject()
|
||||
jsonObj.put(RES, currentResult)
|
||||
|
|
|
@ -30,7 +30,6 @@ const val COMMA = ","
|
|||
|
||||
// shared prefs
|
||||
const val USE_COMMA_AS_DECIMAL_MARK = "use_comma_as_decimal_mark"
|
||||
|
||||
const val RES = "res"
|
||||
const val PREVIOUS_CALCULATION = "previousCalculation"
|
||||
const val LAST_KEY = "lastKey"
|
||||
|
@ -38,5 +37,4 @@ const val LAST_OPERATION = "lastOperation"
|
|||
const val BASE_VALUE = "baseValue"
|
||||
const val SECOND_VALUE = "secondValue"
|
||||
const val INPUT_DISPLAYED_FORMULA = "inputDisplayedFormula"
|
||||
|
||||
const val CALCULATOR_STATE = "calculatorState"
|
||||
|
|
Loading…
Reference in New Issue