Skip to content

v2.0.0

Compare
Choose a tag to compare
@maltaisn maltaisn released this 10 Mar 18:05
· 48 commits to master since this release
  • Changed package name to com.maltaisn.calcdialoglib.
  • To change the dialog settings, CalcDialog.getSettings() must now be used.
  • Order of operations is now applied by default. This can be changed with setOrderOfOperationsApplied(Boolean).
  • Added a setting to show the typed expression (setExpressionShown(Boolean)), which can also be edited (setExpressionEditable(Boolean)).
  • Added a setting for choosing the numpad layout: like a phone (top row 123) or a calculator (top row 789).
  • Added a min value setting separate from max value. As a consequence, setSignCanBeChanged setting was removed, use a minimum or maximum of 0 instead. If the minimum or the maximum is 0, special error messages like "Result must be positive" will still be shown.
  • Added calcHeaderElevation, calcHeaderStyle, calcExpressionStyle and calcExpressionScrollViewStyle style attributes.
  • Added getters to CalcSettings for better Kotlin interoperability.
  • Added a calcHeaderElevationDrawable attribute, needed to customize the header before API 21.
  • Changed setValue(BigDecimal) to setInitialValue(BigDecimal).
  • Changed setClearOnOperation(Boolean) to setShouldEvaluateOnOperation(Boolean).
  • Changed setShowZeroWhenNoValue(Boolean) to setZeroShownWhenNoValue(Boolean).
  • Changed minus sign from hyphen - to unicode symbol .
  • Changed "Out of bounds" error behavior, now only shown when OK is pressed.
  • Changed default maximum dialog height from 400dp to 500dp.
  • Replaced all formatting settings with NumberFormat:
    • setMaximumIntegerDigits: maximum integer digits than can be typed, but more could be displayed.
    • setMaximumFractionDigits: maximum fraction digits than can be typed and displayed.
    • setDecimalFormatSymbols: change decimal separator, negative sign, grouping symbol, etc.
    • setGroupingUsed: enable or disable grouping.
    • setRoundingMode: change the rounding mode, also used for division by the calculator.
    • More settings available like prefix, suffix and minimum digits.
  • Removed calcHeaderHeight attribute, use android:layout_height in calcValueStyle instead.
  • Removed com.google.android.material dependency.