getting unfortunately stopped error when i define onItemSelectedListener
I really can't understand what is the problem.
This running very well.
super.onCreate(savedInstanceState);
setContentView(R.layout.select);
Resources r = getResources();
values = r.getStringArray(R.array.values);
sSelect = (Spinner) findViewById(R.id.sSelect);
tvSelect = (TextView) findViewById(R.id.tvSelect);
But this isn't working.
super.onCreate(savedInstanceState);
setContentView(R.layout.select);
Resources r = getResources();
values = r.getStringArray(R.array.values);
sSelect = (Spinner) findViewById(R.id.sSelect);
tvSelect = (TextView) findViewById(R.id.tvSelect);
sSelect.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long
arg3) {
// TODO Auto-generated method stub
}
});
I really want to know what is the problem. Also how can i know what is the
problem? There is no error reporting in android programming?
EDIT: setOnItemClickListener cannot be used with a spinner Which listener
can i use with spinner? I don't want to use onItemSelectedListener because
It run when app start.
No comments:
Post a Comment