Can someone tell me what's wrong with this code? Eclipse doesn't show any errors, but nothing happens when the spinner is clicked.
Code:
Spinner startTime = ( Spinner ) findViewById ( R.id.project_start_time);
startTime.setOnTouchListener(new OnTouchListener(){
@Override
public boolean onTouch(View v, MotionEvent event) {
Toast.makeText ( NewTaskActivity.this, "test", Toast.LENGTH_SHORT );
return false;
}
});
XML:
<Spinner
android:id="@+id/project_start_time"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />