Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attrs in own namespace #6

Closed
GoogleCodeExporter opened this issue Apr 25, 2016 · 2 comments
Closed

attrs in own namespace #6

GoogleCodeExporter opened this issue Apr 25, 2016 · 2 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Accepted

@GoogleCodeExporter
Copy link
Author

Fixed in r27

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

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant