Reputation: 2167
As a user of Android Studio, I'd like to know where a string in strings.xml is used because I want to remove the strings which aren't in use.
Upvotes: 6
Views: 2547
Reputation: 747
Easier way to find unused strings in Strings.xml is to launch an inspection code from top menu of Android Studio (Analyse/Inspect code) on whole project.
In the inspection window, go to "Android Lint/Unused ressources", there you will find all the unused strings.
It will avoid you to make "find Usages" for lot of strings !
Upvotes: 4
Reputation: 1578
Right click on a string in your strings.xml-> click "Find Usages" to see where it's used.
If it's not used anywhere then a little dialog will pop up in the corner saying so.
Upvotes: 12