android - Why it says there's error "No resource found that matches" even though it exists? -
error message
error: error: no resource found matches given name (at 'style' value '@style/rightbehindmenuscroll').
layout/activity_behind_right_simple.xml
<scrollview xmlns:android="http://schemas.android.com/apk/res/android" style="@style/rightbehindmenuscroll" > <linearlayout style="@style/behindmenuscrollcontent" android:paddingtop="25dp" > <textview style="@style/behindmenuitemtitle" android:text="right" /> <textview style="@style/behindmenuitemlabel" android:text="item0" /> <textview style="@style/behindmenuitemlabel" android:text="item1" /> <button android:id="@+id/behind_btn" style="@style/behindmenuitemlabel" android:text="button" /> </linearlayout> </scrollview>
values/styles.xml
<resources> <!-- base application theme, dependent on api level. theme replaced appbasetheme res/values-vxx/styles.xml on newer devices. --> <style name="appbasetheme" parent="android:theme.light"> <!-- theme customizations available in newer api levels can go in res/values-vxx/styles.xml, while customizations related backward-compatibility can go here. --> </style> <!-- application theme. --> <style name="apptheme" parent="appbasetheme"> <!-- customizations not specific particular api-level can go here. --> </style> <style name="leftbehindmenuscroll"> <item name="android:layout_width">240dp</item> <item name="android:layout_height">fill_parent</item> <item name="android:background">@drawable/leftbg</item> </style> <style name="rightbehindmenuscroll"> <item name="android:layout_width">200dp</item> <item name="android:layout_height">fill_parent</item> <item name="android:background">@drawable/rightbg</item> </style> <style name="behindmenuscrollcontent"> <item name="android:layout_width">fill_parent</item> <item name="android:layout_height">fill_parent</item> <item name="android:orientation">vertical</item> <item name="android:padding">8dp</item> </style> <style name="behindmenuitemtitle"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_marginleft">8dp</item> <item name="android:layout_marginbottom">8dp</item> <item name="android:textsize">22sp</item> <item name="android:textcolor">#ffffff</item> </style> <style name="behindmenuitemlabel"> <item name="android:layout_width">wrap_content</item> <item name="android:layout_height">wrap_content</item> <item name="android:layout_marginleft">8dp</item> <item name="android:layout_marginbottom">8dp</item> <item name="android:textsize">18sp</item> <item name="android:textcolor">#ffffff</item> </style> </resources>
thats b'coz using styles.xml instead of style.xml.
try changing referance follows...
<textview style="@styles/behindmenuitemtitle" android:text="right" />
in same way other referances of styles.xml file...
Comments
Post a Comment