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

Error reported in unused style does not check the parent #13

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

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. If you have a style that derives from a another style using "parent=" and 
the parent is not referenced anyplace - the tool reports the parent style as 
unused, even if the child style is used


What is the expected output? What do you see instead?
It should not report if the child style is used


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


Please provide any additional information below.


Original issue reported on code.google.com by bimat...@ubermind.com on 20 Sep 2011 at 6:19

@GoogleCodeExporter
Copy link
Author

Can you provide an example of the declaration of the child style?

Something like:
<style name="test" parent="whatever"/>

I'm having a tough time reproducing this.

Original comment by skenned...@gmail.com on 21 Sep 2011 at 1:50

@GoogleCodeExporter
Copy link
Author

Here is the exact style in my code and it reported the SegmentedButton is not 
used, since it was not directly used on my layout files.  
  <style name="SegmentedButton">
        <item name="android:layout_width">0dp</item>
        <item name="android:layout_weight">1</item>
        <item name="android:layout_height">wrap_content</item>
        <item name="android:button">@android:color/transparent</item>
        <item name="android:padding">4dp</item>
        <item name="android:textColor">#FFFFFF</item>
        <item name="android:gravity">center</item>
        <item name="android:background">@drawable/segmented_center_bg</item>
        <item name="android:textSize">16dp</item>
    </style>
    <style name="SegmentedButtonLeft" parent="SegmentedButton">
        <item name="android:background">@drawable/segmented_left_bg</item>
    </style>

Original comment by bimat...@ubermind.com on 21 Sep 2011 at 7:22

@GoogleCodeExporter
Copy link
Author

I wasn't aware you could reference a parent like that for a style.  Seems like 
an easy change.  It's not enough for a new release though - there's one other 
bug I want to fix first.

Original comment by skenned...@gmail.com on 21 Sep 2011 at 11:44

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

Fixed in r28

Original comment by skenned...@gmail.com on 21 Sep 2011 at 11:50

  • 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