I used TextView#getMaxLines() in my application for several weeks without incident.
Lint now tells me that it is only available in API 16+ ( #setMaxLines() is an API 1 + ...), although (as far as I know) I have not modified anything that could cause this sudden flag - my min- sdk was 8 for a while, and I have files in my source control to prove it.
1) Why can lint flag this error randomly? (To be clear, I want to say that he had to catch him initially - I do not mean that this is what he should not have noted at all).
2) Is there a way to extract maxLines for TextView on pre-api 16 devices? I checked the source , but could not create a way to get this value using public methods on the 2.2 device .
source share