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

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -