android - R.id. values get overwritten -


in android app i'm creating new webviews java code; after create these webviews working id's overwritten.

example snippet:

for (int i=0;i<mywebviewarray.length;i++){     mywebviewarray[i]=new webview(); } ((button)findviewbyid(r.id.mybutton).settext("ok"); 

if run code, exception on last line:

java.lang.classcastexception: android.webkit.webview

it seems me if tables backing findviewbyid overwritten. tried calling setid in loop. not help.

how can resolve problem?

what in mywebviewarray. seems me have in there isnt webview , trying instantiate webview.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -