Monday, April 7, 2014

The same control ID, how to locate?


The same control ID, how to locate?
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
I want to traverse the menu submenus, submenus id find the same? By findViewById () to find only the first one menu below how to find ah
Reply:
All the controls layout file will generate an ID file in R, if different controls with the same ID, the R files can only generate a unique ID for entry to find access, then locate only one positioning control, the other One is unable to locate the. The solution can only be different controls to identify different ID.
Reply:
Do not use the same id in the same layout file
Reply:
Different control ID to identify different
Reply:
Use a different ID,
Reply:
A layout in different controls do not recommend using the same ID, in order to distinguish
Reply:
Do not use the same xml same id
Really have the same id, then (such as a reference to the same layout xml) can be referenced by the parent element View.findViewById
Reply:
reference to the 7th floor tanwei4199 reply:
same xml Do not use the same id
Really have the same id, then (such as a reference to the same layout xml) can be referenced by the parent element View.findViewById
Upstairs positive solution

No comments:

Post a Comment