3
I’m developing an Android app that calculates 3x3 matrices
so I’m 18 EditText
, however if I want to multiply a matrix 2x3, 2x2, 1x2, etc. I would have to fill the fields of the matrix size and leave the other fields with 0 and this would not change the result.
I made a condition for him to warn if the field is empty but the best thing would be for him to consider the empty field as "0" without needing the user to fill in all fields
Obgd, but if Usario deletes "0" the app will crash I need the app to consider the empty field as the number "0"
– Matheus Muriel
When this happens the correct, as you say you are already doing, is to warn the user,
– ramaral
Note that now no longer obliges the user to fill in all fields, the zero will appear by default.
– ramaral
I did what you said in every field. And I created an if that if I have an empty field it shows a warning instead of calculating, then it does not crash, it was a good temporary solution, but if someone has a hint of how to calculate the null field as 0 I am very grateful
– Matheus Muriel