android - unresolvable symbols as variables assigned to the widgets -


in following code snippet, field , buttonclickhandler both highlighted red, , selecting + holding alt + hitting enter not resolve it.

i have widgets in layout xml file, wonder missing here? doing wrong?

package com.example.me.android;  import ...  public class mainactivity extends appcompatactivity {     // variables assigned widgets.     //     protected button _button;     protected textview _field;     protected imageview _image;      // path , filename of photo.     //     protected string _path;      // gets set 'true' once photo has been taken.     //     protected boolean _taken;      // variable used key determining whether or not photo taken.     //     protected static final string photo_taken = "photo_taken";       @override     protected void oncreate(bundle savedinstancestate)     {         super.oncreate(savedinstancestate);         setcontentview(r.layout.activity_main);          // take picture , correct rotation.         //         _button = (button) findviewbyid(r.id.button);         _image = (imageview) findviewbyid(r.id.image);         _field = (textview) findviewbyid(r.id.field);         _button.setonclicklistener( new buttonclickhandler() );         _path = environment.getexternalstoragedirectory() + "/images/make_machine_example.jpg"; } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -