I have an app with on view.onClickListener that triggers when I run an adroid 2.1 emulator, but not on a 2.2 emulator or actual droid phone running 2.2Simple onClickListener to change activities:
- Code: Select all
public View.OnClickListener caseClickListener = new View.OnClickListener() {
public void onClick(View v) {
Intent myIntent = new Intent(v.getContext(), Attempts.class);
startActivityForResult(myIntent,0);
}
};
This is hanging out in my main activity class. Upon loading, a class is created (called aCase) that extends a LinearLayout. I say:
- Code: Select all
aCase.setOnClickListener(caseClickListener);
And I see that this is called, but when I click the LinearLayout that is aCase, the caseClickListener does not trigger or fire in 2.2, like it did in 2.1!
Any ideas?
I have tried setting all sorts of things to focusable and focusableInTouchMode, like someone mentioned on the internets, but it has no effect. What changed from 2.1 to 2.2? My project still only needs 2.1 to run so I would hope the code would be backwards compatible for a 2.2 device, but no go!!


