I'm getting an error after using this StackOverflow answer:
setSelectionFromTop()
requires API level 21 (current min. is 10)
and When I checked android API, it was added in API Level 1. How can I solve it?
I'm getting an error after using this StackOverflow answer:
setSelectionFromTop()
requires API level 21 (current min. is 10)
and When I checked android API, it was added in API Level 1. How can I solve it?
After some googling it seams that yeah, it's a bug...
As @pelotasplus says it's a bug and seems google still doesn't solve it till now. You can add @SuppressLint("NewApi")
annotation to prevent lint check. See https://developer.android.com/studio/write/lint.html#src