Android considers XML-based layouts to be resources, and as such layout
files are stored
in the res/layout directory inside your Android project.

Each XML file contains a tree of elements specifying a layout of widgets and
their containers
that make up one view hierarchy. The attributes of the XML elements are
properties, describing
how a widget should look or how a container should behave. For example, if a
Button element
has an attribute value of android:textStyle = "bold", that means that the
text appearing on
the face of the button should be rendered in a boldface font style.

Android’s SDK ships with a tool (aapt) which uses the layouts. This tool
should be auto-
matically invoked by your Android tool chain (e.g., Eclipse, Ant’s
build.xml). Of particular
importance to you as a developer is that aapt generates the R.java source
file within your
project, allowing you to access layouts and widgets within those layouts
directly from your
Java code.


On Sat, May 8, 2010 at 9:48 PM, Ubuntu Explorer <ubuntuexplo...@gmail.com>wrote:

> Hello ,
>
> Why is R.java named so?
>
> It seems to store "IDs" in static variables like R.layout etc.
> It looks like this is Android's way of keeping track of predefined UI
> elements in the Manifest file.
>
> Is it possible to access Views created during runtime using the same class
> "R"?
>
> Regards,
> UE.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Beginners" group.
>
> NEW! Try asking and tagging your question on Stack Overflow at
> http://stackoverflow.com/questions/tagged/android
>
> To unsubscribe from this group, send email to
> android-beginners+unsubscr...@googlegroups.com<android-beginners%2bunsubscr...@googlegroups.com>
> For more options, visit this group at
> http://groups.google.com/group/android-beginners?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

Reply via email to