I tried this different ways and none worked. First the explanation:
Picture of the table(gridview):
- I have a Table aka (GridView to be specific) which i fill with TextFields.
- The right upper triangle can be edited, the bottom one can't.
- If the user inputs 1-9 the mirrored field get's the value of 1/(1-9)
- The user also has the ability to write 1/(1-9) and the mirrored field get's the value 1-9 (Doesn't matter if the input is 1/9 or the actual number, 0.1111)
The third point is easy, I just used changeListener got both textfields and changed the values. (simple regex: ^[1-9]). This is already done.
I've tried with making if statements with regex checking if it starts with 1 and then 1/ and then 1/(2-9), but it got alot of errors (error that looks something like that =>, I dont' remember the description), it's overly complicated and causes problems later. I also tried that the user can input decimals 0.1111=9 also the same problems.
Is there a listener that I can use that starts when user finished (input is whole). Or how would you tackle the problem?