| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Bug: 22206007
Some languages contain oversized glyphs which may inadvertently be
clipped when displayed by AlignedTextView. The updated text sizes and
padding values should ensure that enough room is always reserved for
these glyphs (even when font scaling is set to HUGE).
Change-Id: Ic62df3104d033b1eafcf7d83f7e91d5329c8be70
|
|
|
|
|
| |
Change-Id: I631ffe9434ba119d50835247c1bd6cfcbc77355c
Auto-generated-cl: translation import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 20650813
This preserves fraction and "with leading digits" displays during
rotation.
It also turns out to easily support copy, which is a useful bonus,
since it was an obvious hole in the UI for the fraction display.
For the "with leading digits" display, this is similar to a
plain display copy, but it allows character-level selection.
Much of the code here was cloned from Justin's.
Change-Id: I4805280fa6a46f06833be0bde9563c3ce04dca45
|
|
|
|
|
| |
Change-Id: I056e6fc7b94b012c201482599fb72049fb5684b3
Auto-generated-cl: translation import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 20503008
Correctly provide content position information to the ActionMode so
that menues can be better positioned.
Highlight a result that's about to be copied.
Ensure that the end of the current formula becomes visible when
the paste menu appears.
Change-Id: I318985776e59175b827d5089c0ca4978f3a658cb
|
|
|
|
|
| |
Change-Id: Ic085325ca1a9d961fd0523413fb32809bd1f06ed
Auto-generated-cl: translation import
|
|
|
|
|
| |
Change-Id: I8cc3950cd7b93664d23929ec37a46c592f4dd6fe
Auto-generated-cl: translation import
|
|
|
|
|
|
|
|
|
|
| |
Bug: 21623405
Bug: 21603293
Make comments more descriptive for transalation. The attached bugs
requested this for "10 to the power of".
Change-Id: I75da9fcfb076cf74d095d3abef5312571607f0fe
|
|
|
|
|
| |
Change-Id: I31ef49f951ba3ec9e4ebb048962fca8aa9394377
Auto-generated-cl: translation import
|
|
|
|
|
| |
Bug: 21708864
Change-Id: I837c7b768461ab065093c6ef6fbf0dec3acd1c2d
|
|
|
|
|
| |
Bug: 21688370
Change-Id: I59b05d038f261f40893a025824355b19b0a2b249
|
|
|
|
|
| |
Bug: 21692303
Change-Id: I5db0e28a60e4daa40117fee899037ac198de859e
|
|
|
|
|
| |
Change-Id: I056e787b11077e07779dfa2cee04fd639d106a22
Auto-generated-cl: translation import
|
|
|
|
|
|
| |
Bug: 20497138
Bug: 20648856
Change-Id: Id71e2c1922447957b61e3c06b205f991f01eea27
|
|
|
|
|
| |
Bug: 19186434
Change-Id: I0e4793c2ea1fa06bcf0ddee9d642d4732aa8ce84
|
|
|
|
|
| |
Change-Id: Ibeda9e7966196a27a449f3c44ca8625710ee8265
Auto-generated-cl: translation import
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 21493470
Add x^2 10^x and e^x functions, to make the recently added INV key
work as expected.
Implement % functionality.
10^x is essentially just macro expansions for now.
% and x^2 need trivial evaluator support to provide reasonable display
syntax.
We decided to add evaluator support for exp() as well.
Add corresponding exp() support to BoundedRational and its tests.
Tiny incidental changes for problems uncovered in the process:
Fix bug in tests/README.txt
Evaluate the constant e only once.
Add one more power test along with the exp() test.
Fix proguard.flags so BRTest runs again.
Change-Id: I26cfcaf6d99aeec11387297cc5586e2ddcab6add
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 21553173
Since the Calculator is UI is predominately LTR, the error strings
should be forced to right align regardless if they contain RTL
characters. However in order to use the textAlignment attribute, the
supportsRtl attribute must also be set to "true" in the manifest and
the Calulator's layoutDirection must be hardcoded to "ltr".
Change-Id: I40396622c334e276bda9e0020dcdcfe94192a42c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | | |
Bug: 21048603
Change-Id: Ic4d866e73f53044554dca5dcc9f85ff2c846267f
|
| |/
|/|
| |
| |
| | |
Change-Id: I26986e3db880a534876c82a9483f041251bf6955
Auto-generated-cl: translation import
|
|/
|
|
|
| |
Change-Id: Ib37271c76ad26f36c7289f67bd3c2e6a92ef60c5
Auto-generated-cl: translation import
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 20915670
Bug: 21489377
- Adjust font metrics across all supported device configurations to
support font scaling and min touch size requirements.
- Support proper font scaling for non-scrollable results when performing
the evaluate animation.
- Remove restriction for only using 4/5 of the width of the result
display (NOTE: the result's textSize must match the formula's
minTextSize).
- Add AlignedTextView base class to ensure formula/result padding is
based on the displayed text's ascent/baseline.
Change-Id: Id53e9bdc6e699fb05fdf331a6a472ecc170edf38
|
|/
|
|
|
| |
Change-Id: I13d67edad17b2848b5d919da6e4831322c563ee2
Auto-generated-cl: translation import
|
|
|
|
|
|
|
|
|
|
| |
Bug: 7263319
Bug: 20841915
- Switch to using GridLayout instead of custom ViewGroup.
- Added '%' operator button (Note: evaluation support WIP).
Change-Id: I0d07f01fe4224c43e53c916b034362d906bea405
|
|
|
|
|
| |
Change-Id: Ie490b6b1251f93b02dd8c4b7c7a535a935ef6106
Auto-generated-cl: translation import
|
|
|
|
|
| |
Change-Id: Ie9cae016e295b61aafffd65ab06caee408244880
Auto-generated-cl: translation import
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 20562484
Inhibit scrolling past the last nonzero digit when we can identify it.
Increase length of immediate result a bit, to make it closer to the
L calculator. On "=", expand less for scrollable results, more for
short non-scrollable results. This allows us to use larger fonts for
short finite results.
Fix up animation logic when displaying result. The old version was
never quite right, and became more visibly wrong with variable
enlargement. This version is simpler and seems to give much better
results.
This still does not add ellipsis at the right end of a result. But
it is now easily possible to tell whether a result is known finite by
attempting to scroll it. That may be good enough.
Remove some obsolete TODO entries.
Change-Id: I25a842a743e1c27191ca18ac69aa9eef0f0ea9b1
|
|
|
|
|
| |
Change-Id: I87ba4e2011839a3b5e092dbd42d7317283a9b7b9
Auto-generated-cl: translation import
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Bug: 20764417
Bug: 20838790
Finish the action mode when we do almost anything else.
We should probably be even more aggressive about terminating it,
and we may eventually want to use a different approach.
But this avoids the crashes, and greatly improves the behavior.
Display copy menu only when there is something to copy.
Fix a couple of bugs introduced by recent instant display overhaul
(one line each):
- Instant display disappeared on rotation.
- It was sometimes still possible to scroll the previous result after
CLR.
Change-Id: I1a91d312358898add1e281aaba116d709b4c92a7
|
|/
|
|
|
| |
Change-Id: Ia84d147162636a1bc72f9df4e153070453070b3f
Auto-generated-cl: translation import
|
|
|
|
|
|
|
| |
Bug: 20973349
Bug: 20980152
Bug: 21024589
Change-Id: I5566d8d94abdc97c52740c97ed57cea98ddc9462
|
|
|
|
|
| |
Change-Id: I4b2b94167b4792155038cc3a9d6f4f3927895ca0
Auto-generated-cl: translation import
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 20877857
Bug: 20815563
- Condensed strings to one string.xml with translatable="false".
- Made functions and digits NOT localized.
- Switched to U+2007 character for unknown digits.
Change-Id: I51a108309ccfa9c40edd6f87f9e052ba7ee25e3a
|
|
|
|
| |
Change-Id: I9cda04bad99b33875ee1ed084fde09db5893f9dd
|
|
|
|
|
|
|
|
|
|
| |
Bug: 20503109
- Open source licenses are now displayed as a standalone Licenses
activity.
- Show/hide result options instead of enabling/disabling them.
Change-Id: I7e1e43ac83d2417b2f59f90e6a1fc3e491c6ddc7
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bug: 20625562
Bug: 20649711
Bug: 20561890
Bug: 20561528
Bug: 20442590
Bug: 15473140
Bug: 20503008
Bug: 20503007
- Improve timeout text.
- Recalculate when Calculator is rotated, e.g. in error state, thus
reproducing message. It's unclear this is good enough, but it's
better.
- Fix square root parsing.
- Fix concatenation of numbers when pasting by adding explicit
multiplication.
- Display divide by zero error differently from other domain errors.
- Improved advanced keypad layout of portrait-mode tablet calculator.
- Improved overflow menu order. (More to be done.)
- Report zero division as zero division when we can recognize it.
- Switch to floating menus for copy/paste.
Change-Id: I3875414f293e62a59b0e41f0de822f29bd5ac6a6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adjust result padding to prevent overlapping with options menu,
resulting in inability to access options menu.
Reset state correctly after clear, preventing occasional crashes.
Do this at end of animation to prevent animation glitches.
Have clear but the display in a state in which COPY does
nothing interesting.
Treat a not-known-to-be-exact zero result better. Before this
we displayed it as just "0", giving the mistaken impression of
exactness. It is unclear whether we should display it as "0.00000000"
or add an exponent to indicate the real evaluation precision.
The former probably works better for beginners; the latter for
experts. We now do the former, which is probably right.
Also correctly save and restore not-yet analyzed characters.
Change-Id: Iac46d0d3b5a06f61beb6af7d4f0910e43284f52b
|
|
|
|
| |
Change-Id: Ie2b8c35793882a1cc2a9881aaf6f3cfea4dbf260
|
|
|
|
| |
Change-Id: I55958260b4279b504e79b7a104a813a1273ae403
|
|
|
|
|
|
|
|
| |
- Switched back to using com.android.calculator2 package name.
- Setup to replace Calculator package.
- Replaced launcher icon with fishfood variant.
Change-Id: Ie3a74249e4d1808c50bfd86a3030e0ae61165c67
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change layout to make the result display use a fixed font
size and limit the number of characters when it appears below the
formula. This allows us to always get the proper expansion effect
and prevents scrolling from affecting the font size.
Add copy support for result display.
Add paste support for the formula.
Add keyboard input support.
Copy/paste can be used to remember old results in the calculator.
We save an identifying tag URI in the clip, in addition to text,
allowing us to paste old calculator results without precision
loss.
Copy/paste currently does not rely on selection at all.
I had trouble making it work that way in the formula. It's
unclear that would be better, since we only allow copy of the
entire text and paste at the end.
Add a couple of alternate result display options to the
overflow menu. (These appear quite useful, were trivial to
implement, and give us a better excuse for the overflow menu.)
Changed the behavior of the delete key in error state.
Changing it to CLEAR seemed unfriendly, since it prevents
corrections. This is a change from L.
Made it clear that the CalculatorHitSomeButtons test is
currently 95% worthless. It was apparentlly failing (due to test
infrastructure issues) but throwing an exception in a thread from
which it was not getting reported. Decided to keep it, since I
would like a place to continue collecting regression tests, even
if we can't actually run them yet.
Includes some easy drive-by fixes for expression evaluation:
a) 2 / 2 * 3 was mis-parsed as 2 / (2 * 3).
b) Cosine evaluation had the sense of the test for a rational result reversed.
c) Constants without leading digits, like .1, are now handled correctly,
and decimal points in the formula are now internationalized.
(That's not yet true for the result.)
Change-Id: Ic24466b444b4a4633cfb036c67622c7f4fd644ec
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a button for switching between degree and radian mode.
Handle display updates in response to mode switching in a reasonoble way.
Improve the button layout so that it is usable on tablets.
Add DEG/RAD mode display at the top.
Fiddle with some of the layout parameters so they make more sense
to me.
This may need further tuning.
Change-Id: I8d04b235cfcb1f0a0d8f4a0ad6a0dc6e5eac8c5d
|
|
|
|
|
|
|
|
| |
They hadn't been maintained and used the wrong string names.
They makes lint a bit happier and the build much quieter.
Change-Id: I334c1170dab2be32c935de2bf60a8070144e9a7d
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the arity library with a new evaluation engine based on
an open source "constructive reals" library. This provides answers
that are correct to the last displayed digit, and can be scrolled to
get more precision, with evaluation to additional precision
proceeding on demand.
This uses pieces of an old prototype calculator with a
pre-Material-Design UI. Since the code structure of the KitKat and
Lollipop calculators is quite different, this merge required major
changes to make the pieces fit again. An egregious bug in the
prototype related to the evaluation of the power operator was
fixed. Many new UI bugs are introduced to compensate :-)
Add separate buttons for inverse trig functions.
Add long TODO lists for various missing pieces.
This is really designed to get something up and running
that looks like it has a Material Design UI.
This version kind of works, though with many UI deficiencies.
This addresses external issues 63368, 81089, and 80990. It
partially address the degree vs radian (80330) issue as well,
though we're still missing the UI for that.
This fixes
Bug:15284587
(More work is needed to make this interact correctly with keyboard support.)
Degree/Radian mode is also internal
Bug:17059768
This provides much more robust solutions to the following, which were
previously fixed by favoring round numbers over precise solutions:
Bug:15747298
Bug:15332726
Change-Id: Ib64ffcee9760a3195ae2a48302308eeb09a156bd
|
|
|
|
|
| |
Change-Id: I066ef0303c1ca69d266c1d6d339d65ed06f80ceb
Auto-generated-cl: translation import
|