On this note, I was wondering: when exactly is R.java updated?  Here are
some cases that have caused confusion for me.

- I add a new file in the res/layout folder.  R.java is NOT updated with my
new xml file.

I perform a CLEAN on the project and then...
- I delete a file such that main.xml is the only file remaining.  R.java IS
updated!
- I delete a file after having added two -- that is, main.xml is not the
only file remaining.  R.java is NOT updated.

Any ideas?  I especially am interested in making the R.java file pointing to
the newly added xml files (case 1 of the three in my list).

-Danny

On Sat, May 8, 2010 at 7:23 PM, joshua hublar <joshua.m.hub...@gmail.com>wrote:

> 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<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