When coding Android projects, resource variables are somewhat cumbersome to define, as they involve visiting a file far away in the directory structure and writing xml(!).
Say I want to define a string resource called street
. I'll need to:
- Visit
res/values/strings.xml
; - Type an xml entry like
<string name="street">VALUE</string>
.
If the resource was a number or a list, it goes into another file.
Ideally, this could all be done automatically.
- I would write
R.string.street
in java code (which already have to do anyway); - Then I would just call this magic command;
The command could ask me for the VALUE
to use, and it could infer
everything else from the R.string.street
under point.
Is there a minor-mode or a command that will do this for me?