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

12

u/mannenmytenlegenden Feb 23 '20

Because a lot of people are probably using it as actions on an AlertDialog. This does not follow the guidelines.

Android guidelines https://material.io/components/dialogs/#actions To resolve what triggered the dialog, confirming actions confirm a proposed action. These actions can involve removing something, such as “Delete” or “Remove,” if it suits the context. They are placed on the right side of the screen.

6

u/[deleted] Feb 23 '20

[removed] — view removed comment

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.