diff options
author | Hans Boehm <hboehm@google.com> | 2015-04-21 13:18:38 -0700 |
---|---|---|
committer | Hans Boehm <hboehm@google.com> | 2015-04-28 00:35:23 +0000 |
commit | 08e8f322b0d93e06aaa2a15acc869dfd70791461 (patch) | |
tree | 030d2d655227ffc3c71b8af92918881d250f0284 /res/values | |
parent | 9e855e82dc86b3038b3e048a56be77af114e24f4 (diff) | |
download | android_packages_apps_ExactCalculator-08e8f322b0d93e06aaa2a15acc869dfd70791461.tar.gz android_packages_apps_ExactCalculator-08e8f322b0d93e06aaa2a15acc869dfd70791461.tar.bz2 android_packages_apps_ExactCalculator-08e8f322b0d93e06aaa2a15acc869dfd70791461.zip |
Restructure display formatting, use TextView for formula.
This fixes issues with inappropriate keyboard popups and cleans
up the code.
This substantially rewrites the result formatting code;
it intentionally removes a heuristic to avoid conventional scientific
notation for short results, which only seemed to confuse things.
There are some other tweaks and simplifications. Transitions
to and from conventional scientific notation should be smoother,
though there is still an issue with numbers like 10^-30.
The formatting code is completely extracted from Evaluator, cutting
off various tentacles, and moved to CalculatorResult.
Fixes a bug that resulted in digits being inappropriately
displayed without an exponent if the decimal point was just off
the left edge of the screen.
It's still not clear that we should always be integrating the
exponent into the result window.
Bug: 20483801
Bug: 20480081
Change-Id: I1bb777b871e9fa8b6cd510c533e4b94bde6d4a20
Diffstat (limited to 'res/values')
-rw-r--r-- | res/values/attr.xml | 2 | ||||
-rw-r--r-- | res/values/strings.xml | 2 | ||||
-rw-r--r-- | res/values/styles.xml | 8 |
3 files changed, 1 insertions, 11 deletions
diff --git a/res/values/attr.xml b/res/values/attr.xml index 5043663..cfefc9d 100644 --- a/res/values/attr.xml +++ b/res/values/attr.xml @@ -17,7 +17,7 @@ <resources xmlns:android="http://schemas.android.com/apk/res/android"> - <declare-styleable name="CalculatorEditText"> + <declare-styleable name="CalculatorText"> <attr name="minTextSize" format="dimension" /> <attr name="maxTextSize" format="dimension" /> <attr name="stepTextSize" format="dimension" /> diff --git a/res/values/strings.xml b/res/values/strings.xml index 2b621bb..3d10202 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -75,8 +75,6 @@ <!-- Abbrev. name of radian mode [CHAR_LIMIT=5] --> <!-- Used both as button label and for status indicator on top --> <string name="mode_rad">rad</string> - <!-- Ellipsis string used in display (e.g. "...". [CHAR_LIMIT=3] --> - <string name="ellipsis">\u2026</string> <!-- Clear operation to clear the currently entered expression. [CHAR_LIMIT=3] --> <string name="clr">clr</string> diff --git a/res/values/styles.xml b/res/values/styles.xml index 12295e5..69a537a 100644 --- a/res/values/styles.xml +++ b/res/values/styles.xml @@ -25,14 +25,6 @@ <item name="android:windowContentOverlay">@null</item> </style> - <style name="DisplayEditTextStyle" parent="@android:style/Widget.Material.Light.EditText"> - <item name="android:background">@android:color/transparent</item> - <item name="android:cursorVisible">false</item> - <item name="android:fontFamily">sans-serif-light</item> - <item name="android:includeFontPadding">false</item> - <item name="android:gravity">bottom|end</item> - </style> - <style name="DisplayTextStyle" parent="@android:style/Widget.Material.Light.TextView"> <item name="android:background">@android:color/transparent</item> <item name="android:cursorVisible">false</item> |