prashant4756 / android-unused-resources

Automatically exported from code.google.com/p/android-unused-resources
0 stars 0 forks source link

hierarchical styles not checked properly #4

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Add a style with the hierarchical naming convention (eg. 
"ParentStyle.ChildStyle")
2. Use style in xml file 'style="@style/ParentStyle.ChildStyle"'.
3. Run checker

What is the expected output? What do you see instead?
Expected:
4. style is treated as used.

Actual:
4. an alert is displayed, which says that a resource ("ParentStyle_ChildStyle" 
- whose name is has had its "." replaced with an "_") is not used. 

Original issue reported on code.google.com by g1adrift on 4 Jan 2011 at 8:43

GoogleCodeExporter commented 8 years ago
Additionally, an alert that "ParentStyle" is unused also is displayed, even 
though it's used for its child, ParentStyle.ChildStyle.

(why did they have to make this system so convoluted?)

Original comment by g1adrift on 4 Jan 2011 at 8:45

GoogleCodeExporter commented 8 years ago
There are actually a few issues related to this.

Specifically, an XML resource with a dot (.) in its name gets changed to an 
underscore (_) in the R.java file.  r15 should deal with this, which fixes the 
the ParentStyle_ChildStyle not used issue.  However, the ParentStyle issue 
remains.

Original comment by skenned...@gmail.com on 14 Apr 2011 at 12:05

GoogleCodeExporter commented 8 years ago
Fixed in r16

Original comment by skenned...@gmail.com on 14 Apr 2011 at 12:24