IronBlossom / android-unused-resources

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

attrs in own namespace #6

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I have my own attrs for custom View-Elements defined in attrs.xml, these are 
marked as unused but are clearly used in more than 10 xml-layout-files

What steps will reproduce the problem?

1. create a attrs.xml with following content:

<?xml version="1.0" encoding="utf-8" ?>
<resources>
    <declare-styleable name="CustomView">
        <attr name="useLightTheme" format="boolean" />
    </declare-styleable>
</resources>

2. now create a custom view-class which inherits e.g. from class View.

3. create a layout-file, using the custom view like this:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:mci="http://schemas.android.com/apk/res/com.company.project"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
    <com.company.project.CumstomView
        android:id="@+id/myviewid"
        android:gravity="center"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"
        mci:useLightTheme="false" />
</LinearLayout>

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

running the AndroidUnusedResources.jar should NOT show up my custom attributes, 
but it does...

attr      : useLightTheme

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

Android Unused Resources 1.0; Fedora 14

Original issue reported on code.google.com by tim.hann...@gmail.com on 25 May 2011 at 3:57

GoogleCodeExporter commented 9 years ago

Original comment by skenned...@gmail.com on 24 Aug 2011 at 1:50

GoogleCodeExporter commented 9 years ago
Fixed in r27

Original comment by skenned...@gmail.com on 24 Aug 2011 at 2:34