mirror of
https://github.com/SimpleMobileTools/Simple-Calculator.git
synced 2025-02-08 15:49:03 +01:00
resolve merge conflicts
This commit is contained in:
commit
f1a8e8c03d
@ -290,7 +290,17 @@ class MainActivity : SimpleActivity(), Calculator {
|
|||||||
// ****** ADD ONSAVEINSTANCESTATE FUNCTION ******
|
// ****** ADD ONSAVEINSTANCESTATE FUNCTION ******
|
||||||
override fun onSaveInstanceState(bundle: Bundle) {
|
override fun onSaveInstanceState(bundle: Bundle) {
|
||||||
super.onSaveInstanceState(bundle)
|
super.onSaveInstanceState(bundle)
|
||||||
|
/*
|
||||||
|
bundle.putString("res", calc.mResult)
|
||||||
|
bundle.putString("savedPreviousCalculation", calc.previousCalculation)
|
||||||
|
bundle.putString("savedLastKey", calc.lastKey)
|
||||||
|
bundle.putString("savedLastOperation", calc.lastOperation)
|
||||||
|
bundle.putDouble("savedBaseValue", calc.baseValue)
|
||||||
|
bundle.putDouble("savedSecondValue", calc.getSecondValueV2())
|
||||||
|
bundle.putString("savedInputDisplayedFormula", calc.inputDisplayedFormula)
|
||||||
|
*/
|
||||||
|
//JSON
|
||||||
|
bundle.putString("myJsonObject", calc.getjson())
|
||||||
}
|
}
|
||||||
//============================================================
|
//============================================================
|
||||||
}
|
}
|
||||||
|
@ -484,4 +484,20 @@ class CalculatorImpl(
|
|||||||
return this.secondValue
|
return this.secondValue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//JSON
|
||||||
|
public fun getJson() : String
|
||||||
|
{
|
||||||
|
val jsonObject = buildJsonObject{
|
||||||
|
put("res", mResult)
|
||||||
|
put("savedPreviousCalculation", previousCalculation)
|
||||||
|
put("savedLastKey", lastKey)
|
||||||
|
put("savedLastOperation", lastOperation)
|
||||||
|
put("savedBaseValue", baseValue)
|
||||||
|
put("savedSecondValue", secondValue)
|
||||||
|
put("savedInputDisplayedFormula", inputDisplayedFormula)
|
||||||
|
return jsonObject.toString()
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user