lixingmao / android-unused-resources

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

Report used ids as unused #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Run Android Unused Resources on the project below:

https://github.com/Anasthase/TintBrowser

What is the expected output? What do you see instead?

Reports ids such as AddonsButtonLayout and AddonsWarningLayout from 
res/layout/addons_fragment.xml as being unused (and other similar cases on the 
same project).

These ids are not used in Java code, but they are in the same layout file as 
positioning reference in relative layouts (with android:layout_below, 
android:layout_above, etc.).

What version of the product are you using? On what operating system?

Version 1.6.2 on Linux Mint.

Please provide any additional information below.

Thanks for this very useful project !

Original issue reported on code.google.com by J.Devauc...@gmail.com on 6 Oct 2012 at 1:38

GoogleCodeExporter commented 9 years ago
android:layout_above="@+id/AddonsButtonLayout"
should be
android:layout_above="@id/AddonsButtonLayout"

The + makes it a declaration, not a reference.  If nothing references it, it is 
listed as unused.  This is working as intended.

Original comment by skenned...@gmail.com on 16 Oct 2012 at 3:45