0

Sorry i have seen lots of this topic questions like this in Stackoverflow, but none of them has helped me yet.

Here is my manifest.xml

<uses-sdk
    android:minSdkVersion="14"
    android:targetSdkVersion="18" />

and here is the style xml code

<style name="Widget.PreferenceFrameLayout">
        <item name="android:borderTop">0dip</item>
        <item name="android:borderBottom">0dip</item>
        <item name="android:borderLeft">0dip</item>
        <item name="android:borderRight">0dip</item>
    </style>

The errors are:

error: Error retrieving parent for item: No resource found that matches the given name 'Widget'.

Thanks in advance.

Community
  • 1
  • 1
Sal-laS
  • 11,016
  • 25
  • 99
  • 169

2 Answers2

1

I don't think the style is public. So its not possible to customize

Try

<style name="@android:style/Widget.PreferenceFrameLayout">
    <item name="android:borderTop">0dip</item>
    <item name="android:borderBottom">0dip</item>
    <item name="android:borderLeft">0dip</item>
    <item name="android:borderRight">0dip</item>
</style>

You need to reference the styles in the android framework

And do check this

https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/styles.xml

Raghunandan
  • 132,755
  • 26
  • 225
  • 256
  • Thanks man, now the problem is in the manifest. The error is * error: Error: Resource is not public. (at 'theme' with value '@style/@android:Widget.PreferenceFrameLayout').* – Sal-laS Apr 25 '14 at 16:59
  • @Salman its global theme i guess. so its not public i guess. Also you have `@style/@android:Widget.PreferenceFrameLayout'` – Raghunandan Apr 25 '14 at 17:01
  • @Salman look at https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/res/res/values/styles.xml. – Raghunandan Apr 25 '14 at 17:03
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/51452/discussion-between-raghunandan-and-salman) – Raghunandan Apr 25 '14 at 17:10
1

May be you don't have parent style name Widget. If you don't have then add a simple style named Widget as in the style resource

<style name="Widget"></style>

then your styles.xml would be look like as

<?xml version="1.0" encoding="utf-8"?>
<resources>

    <style name="Widget"></style>

    <style name="Widget.PreferenceFrameLayout">
        <item name="android:borderTop">0dip</item>
        <item name="android:borderBottom">0dip</item>
        <item name="android:borderLeft">0dip</item>
        <item name="android:borderRight">0dip</item>
    </style>

</resources>
Hamid Shatu
  • 9,664
  • 4
  • 30
  • 41