Darkempire78 / OpenCalc

A simple and beautiful calculator for Android
GNU General Public License v3.0
740 stars 83 forks source link

Results right bound, hence scrolling necessary #12

Closed Aircan closed 1 year ago

Aircan commented 1 year ago

Bug: Calculating 1/3 = 3333333333 You have to scroll to the left to see 3.333333... So right binding is useless. And too many digits after comma, too. Talking about portrait mode

R-Dson commented 1 year ago

The first part can be solved by changing the parameter of the following line to 0 instead of input.text.length. https://github.com/Darkempire78/OpenCalc/blob/629d86c27ce96ce38629f553e4b066b913cee985/app/src/main/java/com/darkempire78/opencalculator/MainActivity.kt#L425

Leif-W commented 1 year ago

If a result would overflow, dynamically reduce font, to a minimum base size, else optionally wrap long lines after minimum font size reached, up to a maximum number of lines, then if still overflow, dynamically give a UI indication of more to look at (i.e. translucent down arrow), and allow vertical scrolling. At least for me, this is generally the UI pattern I would expect and most appreciate. Variations on the idea, and incremental improvements welcome.

ghost commented 1 year ago

I mean, we could show "..." to show that it continues and then if one taps. It popups with the whole number.

Aircan commented 1 year ago

I really think nobody needs more than 7 digits behind comma

Darkempire78 commented 1 year ago

The first part can be solved by changing the parameter of the following line to 0 instead of input.text.length.

https://github.com/Darkempire78/OpenCalc/blob/629d86c27ce96ce38629f553e4b066b913cee985/app/src/main/java/com/darkempire78/opencalculator/MainActivity.kt#L425 @Vanillj

We cannot use that, because it will set the cursor at th first position. We want to scroll to the beginning of the EditText, but keep the cursor at the end of the calculation

I found nothing to do that for the moment...

Darkempire78 commented 1 year ago

Fixed 721e83cacd655d58f9624a5849181172d4f61cc4