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++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -