The Manager will actually get the click events - normally it will just pass them on. But you can process them if you want. The following code demonstrates the easiest way I find to make sure I process everything as I want. Try it on a touch screen and non touchscreen phone.
VerticalFieldManager testVFM = new VerticalFieldManager(Manager.USE_ALL_WIDTH) {
protected boolean touchEvent(TouchEvent message) {
int x = message.getX( 1 );
int y = message.getY( 1 );
if( x < 0 || y < 0 || x >= getExtent().width || y >= getExtent().height ) {
// Outside the field
return false;
}
if ( message.getEvent() == TouchEvent.UNCLICK ) {
Status.show("Manager Clicked");
return true;
}
return super.touchEvent(message);
}
};
LabelField testlab = new LabelField("test", LabelField.FIELD_HCENTER);
testVFM.add(testlab);
LabelField testlab2 = new LabelField("test2", LabelField.FIELD_HCENTER);
testVFM.add(testlab2);
testVFM.add(new NullField() {
protected boolean navigationClick(int status, int time){
Status.show("NullField Clicked");
return true;
}
}); // So Manager can get focus