android - Cannot resolve symbol 'ImageView2' -


i trying create imageview in fragment refer imageview element have created in xml fragment:

@override     public view oncreateview(layoutinflater inflater, viewgroup container,             bundle savedinstancestate) {         super.oncreateview(inflater, container, savedinstancestate);          final view c = inflater.inflate(r.layout.activity_source, container, false);          imageview view = (imageview) getview().findviewbyid(r.id.imageview3);         view.setontouchlistener(this);          return c;      } 

but although thought work cannot resolve 'imageview3'

instead of

(imageview) getview().findviewbyid(r.id.imageview3);

use

(imageview) c.findviewbyid(r.id.imageview3);


Comments

Popular posts from this blog

javascript - How to process users in one specific order using map o each function? -

java - Two interface have same method name with different return type -

javascript - Linking from page A to a specific iframe on page B -