Maxim
Maxim

Reputation: 123

Delete key in Translations Editor

How to delete key in Translations Editor (Android Studio)? I see only green button "+" to for add new key and button as "earth" for add new language. Bt what if I wanted to delete the created key? How could I do that?

Upvotes: 12

Views: 4294

Answers (4)

BrainCrash
BrainCrash

Reputation: 13182

Not sure if this is new in Android Studio 3.2, but you can right click the key and delete it.

enter image description here

Upvotes: 2

Andrew
Andrew

Reputation: 2896

  1. Analyze > Run inspection by name > Unused resources.

  2. Then you'll see on the bottom all unused resources including strings. Right click on specific string resource and choose Remove Declarations for R.string.test. It removes all translations for given key.

enter image description here

PS. Yes, looks like a workaround. But "minus" in Translations Editor doesn't work for me and remove all translations one by one manually - it`s crazy.

Upvotes: 1

user6686813
user6686813

Reputation:

You must select the key and push the button (remove key)...

photo

Upvotes: 4

Maks Hameliak
Maks Hameliak

Reputation: 94

You must remove string resource with your key from strings.xml file

Upvotes: 4

Related Questions