mplekunov / CalculatorApp

GNU General Public License v3.0
1 stars 0 forks source link

Editing Bug #5

Closed mplekunov closed 2 years ago

mplekunov commented 2 years ago

Due to changes in the Editing logic... Now when user edits token in expression, they are no longer "focused" on only "editable" token. Instead, they can freely click on all other tokens and edit them accordingly without first going through the whole "process" of pressing "equal button" -> clicking on the "other" editable token.

mplekunov commented 2 years ago

This "feature" was completely accidental. The only possible problem that I can see as of right now is that when user chooses to edit other tokens without pressing "equal" button first, program highlights other tokens without removing the highlighting for the token that was edited previously.

From what I can see... If I can manage highlighting properly, this "accidental" feature could be leaved as it is because, all in all, I don't see any downside from it, and it provides more editing flexibility.

mplekunov commented 2 years ago

and yeah... I just write this stuff for myself so I won't forget about my "thought process"

mplekunov commented 2 years ago

6 Unfortunately... it looks like there is no "non-dirty" way of managing spannable strings... Initially, I thought I can check their focus and depending on focus listener change highlighting and other stuff... It turned out that it's not possible. Work around was to "reset" highlighting and binding whenever onClick method of spannable is triggered. That would allow me to apply needed formatting and binding for "current" spannable.