Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Shortcut to quickly create/modify string in Android Studio without using strings.xml?

I searched on the web on how to modify or create a string in Android Studio, but didn't find any information on shortcuts.

I just want to modify the @string/app_name from Basic App to My app for example.

I know that I can manually navigate to strings.xml to achieve this, but is there a faster method via shortcut?

like image 686
Félix Desjardins Avatar asked Jan 12 '15 01:01

Félix Desjardins


2 Answers

In Android Studio

  1. to rename string either file

WINDOWS Ctrl + F6

MAC fn + Shift + F6

  1. "extract string resource" to create new string under file resources/string

WINDOWS Alt + Enter

MAC Alt + Enter

I also encourage you guys to see this video which shows some other trick, you may use in order to speed up your programming.

like image 88
murt Avatar answered Nov 13 '22 18:11

murt


Using Mac 10.5+ shortcuts, highlighting a symbol (e.g. method, reference to a resource) and pressing Command+B will take you directly to where that symbol is defined.

On Windows it's Ctrl+B.

like image 2
stkent Avatar answered Nov 13 '22 17:11

stkent