Hi all,
I am a beginner in Android. I have a little bit trouble understanding
the Snake example code.
In the Snake example code, they create a SnakeView class, which
extends View. This is understandable because they want to create a
custom view. But what confuses me is what they did in the layout xml
file.
Inside the layout xml file, this is what they did:
<com.example.android.snake.SnakeView
android:id="@+id/snake"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
tileSize="24"
/>
I understand that "android:layout_width" and "android:layout_height"
attributes are inherited from View class. However, I don't understand
how they can add the "tileSize" attribute in the XML file. I don't see
it anywhere within the SnakeView class. Can any one helps me with
this?
Thanks in advance
Stanley
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
To unsubscribe from this group, send email to
android-developers+unsubscribegooglegroups.com or reply to this email with the
words "REMOVE ME" as the subject.