79405423

Date: 2025-02-01 18:05:09
Score: 0.5
Natty:
Report link

Unfortunately, it doesn't work that way. It is true that the fourth parameter always contains the last status of the EditText and the second is always zero, but the first parameter is irregular, and so are the others (mostly).

I discovered this by doing some debugging experiments. Looks like Google really screwed this one up.

I'm going to try my luck with a TextWatcher instead. While it is true that InputFilter.filter really is supposed to give the text/leftover of the first three parameters that is to be inserted between the fifth and sixth parameter into the fourth, there is simply no way of knowing what values Google assigns to most of the parameters.

EDIT: Actually, the first parameter does seem to be some sort of potpourri of the input, so possibly there is a way to reconstruct the desired output. But this is probably highly case and version dependent.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: AlgebraicsAnonymous