@+id/ means "create the following id" whereas @id/ means "reference the following id." So when you write android:id="@+id/myid" you just created, and assigned, the id "myid" to the widgets. Like strings are generated in R.strings, ids are generated in R.id. So in your code you would do findViewById(R.id.myid).
On Thu, Dec 4, 2008 at 10:02 PM, Josh <[EMAIL PROTECTED]> wrote: > > I know that strings should be stored in res/strings.xml but where do i > store control names(ID's)? > > In this example the name of the id variable(im guessing that's what > it's called) is list_item_title. Where would i define that value? > android:id="@+id/list_item_title" > > Also is this the only way to name controls? in most other languages > that I have used you ussually just set id="somestringvalue". > > Thanks! > > > > -- Romain Guy www.curious-creature.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---