The word '@drawable' is not correctly spelled [android]

Programovacie jazyky, rady, poradňa...
daydalos1
Medium Expert
Medium Expert
Príspevky: 83
Registrovaný: 08 feb 2007, 19:00

The word '@drawable' is not correctly spelled [android]

Príspevok od používateľa daydalos1 »

Caute vytvaram aplikaciu pre android a toto mi vyhodi v xml-ku style.xml

The word '@drawable' is not correctly spelled
<item name="android:background">@drawable/button_bcg</item>

neviete poradit? co s tym?
cely kod mozno vidno tu
http://it4kt.fei.tuke.sk/c/android/scen ... index.html
v piatej casti uloh a tam tie odrazky.
Pozeral som vsetko mam OK nikde ziadny preklep ani nic aj som to googlil viac ludi ma tento problem ale riesenie som nenasiel

diki za rady
daydalos1
Medium Expert
Medium Expert
Príspevky: 83
Registrovaný: 08 feb 2007, 19:00

Re: The word '@drawable' is not correctly spelled [android]

Príspevok od používateľa daydalos1 »

audiotrack napísal:ukáž to xml
<?xml version="1.0" encoding="utf-8"?>
<resources>

<style name="menuButton">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:padding">5dp</item>
<item name="android:layout_marginBottom">5dp</item>
<item name="android:background">@drawable/button_bcg</item>
<item name="android:focusable">true</item>
</style>

</resources>

a v tom button_bcg ktore je ulozene v /res/drawable je toto
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

<item android:state_pressed="true"><shape>
<corners android:radius="20dp" />
</shape></item>

<item android:state_focused="true"><shape>
<corners android:radius="20dp" />

<stroke android:width="2dp" android:color="#645aa38f" />

<corners android:angle="270" android:endColor="#ffaa4E5A" android:startColor="#fbac4E5A" />
</shape></item>

</selector>
Napísať odpoveď