Answer the question
In order to leave comments, you need to log in
How to programmatically assign a unique identifier?
TabHost is filled programmatically:
TabHost.TabSpec tabSpec;
for (int i=0;i<db.sec.size();i++) {
createTabs(i+10, db.sec.get(i));
tabSpec = tabHost.newTabSpec("tag"+i+1);
tabSpec.setIndicator("Секция "+(i+1));
tabSpec.setContent(i+10);
tabHost.addTab(tabSpec);
}
Answer the question
In order to leave comments, you need to log in
aapt generates id for elements specified in xml starting from 0x00FFFFFF and above, so generating id below this number you should not cross.
PS since API 17 it is possible to generate a unique id programmatically via View.generateViewId()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question