There is a way to make refactoring with XML?

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

There is a way to make refactoring with XML?

Postby andreleitao » Tue Apr 28, 2009 2:38 pm

Hi folks,

there is way to make refactoring on a layout file tag? E.g.:

Strings.xml
Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <string name="layout_value">    50     </string>
Parsed in 0.000 seconds, using GeSHi 1.0.8.4


and there is a code re make reference to this value. E.g:

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. int code = R.string.layout_value;
  2.  
Parsed in 0.030 seconds, using GeSHi 1.0.8.4


If I change the xml property name manually the code will show a compilation error bacause "layout_value" will become an undefined symbol. Can I refactor xml properties?

Thanks :)
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Top

Postby WarrenFaith » Tue Apr 28, 2009 3:14 pm

The way I do it:
open R.java, refactor the variable name, save everything, open xml and change the name there.
Works fine so far :D
WarrenFaith
Moderator
Moderator
 
Posts: 227
Joined: Fri Mar 13, 2009 10:59 am
Location: Berlin, Germany

Postby andreleitao » Tue Apr 28, 2009 9:54 pm

It's soooo simple. :D

Thanks WarrenFaith :)
andreleitao
Experienced Developer
Experienced Developer
 
Posts: 70
Joined: Tue Mar 10, 2009 9:56 pm
Location: Recife - Brazil

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 8 guests