Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find usages of Strings.xml in Android Studio?

You can get "Show usages of field xyz" with the help of cursor & command (in Mac) in Java,How to find where specific xml tag has been used? For example how to find usage of Hello key: <string name="Hello">Hello world</string>

like image 268
Amey Jahagirdar Avatar asked Oct 20 '16 08:10

Amey Jahagirdar


People also ask

What is the use of strings xml file in Android?

A string resource provides text strings for your application with optional text styling and formatting. There are three types of resources that can provide your application with strings: String. XML resource that provides a single string.

Where can I find strings in xml?

String. xml file present in the values folder which is sub folder of res folder in project structure.In Android Studio, we have many Views such as TextView,Button,EditText,CheckBox,RadioButton etc.


1 Answers

Right-click on the resource name in the strings.xml (in your case, on Hello) or on the id in the code and select Find usages. This will give you the usages of this res.

OSX Command-Option-F7
Windows Alt + F7

like image 82
Kelevandos Avatar answered Nov 10 '22 08:11

Kelevandos