Skip to content

robin0512/SimpleCalculator

Repository files navigation

SimpleCalculator

Simple Calculator in Android MVVM

A calculator app using LiveData and DataBinding for solving mathematical expressions.

App Screen Recording

sample

ExpressionParserUtil Android Library

In computer science, the shunting yard algorithm is a method for parsing arithmetical or logical expressions https://github.com/jfransp/ExpressionParserUtil-Android-Library

Using MotionLayout make the result more obvious

BEFORE equals button click motionLayout

AFTER equals button click motionLayout2

String removes excess 0

IF answer(String) = "2.0", then show "2"

            if(model.result!!.indexOf(".") > 0){
                model.result = model.result!!.replace(Regex("0+?$"), "")
                model.result = model.result!!.replace(Regex("[.]$"), "")
            }

Dark themes

About

Simple Calculator in Android MVVM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages