views:

37

answers:

1

This was my code:

<android:id="@+id/carrotsmileanim></android:id>

I fixed it because it was missing a quotation mark, but now eclipse won't recognize the quotiations nor the @ sign! What do I do?!?

+4  A: 

What are you trying to do? That's not the way you declare IDs... this is how it works:

<Element android:id="@+id/carrotsmileanim">  </Element>

Notice that Element is usually a View (TextView, Button, etc.)

Cristian
But somebody just told me id's weren't an element!
Mia
@Mia: somebody on Internet can be wrong!
BalusC
@Mia: just do it that way and your life will become wonderful.
Cristian
You're right, id's aren't an element. They're an attribute.
Matty F
Seriously? Imina try it Christian's way... looks promising.
Mia