In the following code i get a NullPointerException on lines 9/10 with findViewById().
In my main class I just instantiated an object from this class, to use .getFrom()>
First , you should call the setContentView(int layout) ,in order to set the Content of your Activity , and then you can get your Views ( findViewById(int id) ) ;
So your Activity will be like this :
public class UserInteraction extends Activity {
EditText etFrom;
int from;
EditText etTill;
int till;
public void onCreate(Bundle savedInstance{
super.onCreate(saveInstance);
this.setContentView(R.layout.main);
etFrom = (EditText)findViewById(R.id.et_from);
etTill = (EditText)findViewById(R.id.et_till);
}
}