r/androiddev • • Feb 23 '20

Android 11 funny things: android.R.string.yes and and android.R.string.no deprecated

android.R.string.yes and android.R.string.no are finally deprecated because they incorrectly match android.R.string.ok and android.R.string.cancel

71 Upvotes

21 comments sorted by

View all comments

Show parent comment

6

u/AD-LB Feb 23 '20

I don't understand. What's the point in having those strings if they are duplicates, and do not even reflect the real words...

9

u/ryanjharter Feb 23 '20

It's a historical mistake. They weren't necessarily always duplicated.

Wording changes, so resource IDs should reflect their purpose, not their content.

2

u/AD-LB Feb 23 '20

Probably. Still weird. Why would anyone choose "yes" if it's the same as "ok"...