public TypeSelectionScreen() {
super(USE_ALL_HEIGHT | USE_ALL_WIDTH | FIELD_HCENTER | FIELD_VCENTER | NO_VERTICAL_SCROLL);
setTitle("NfcWriteNdefSmartTag V" + Constants.MYAPP_VERSION);
AbsoluteFieldManager mgr = new AbsoluteFieldManager();
// bitmaps are 120 x 120
int hgap = (int) ((Display.getWidth() - 240) / 3);
int vgap = (int) (Display.getHeight() - 240) / 3;
int x1= hgap;
int x2= x1 + 120 + hgap;
int y1 = vgap;
int y2 = y1 + 120 + vgap;
MsbConfig uri_btn_config = new MsbConfig();
MsbState uri_btn_state = new MsbState(Constants.BTN_STATE, "Create URI type tag", "Create URI type tag");
uri_btn_state.setbmp_focused(uri_focused);
uri_btn_state.setbmp_unfocused(uri_unfocused);
uri_btn_state.setbmp_clicked(uri_clicked);
uri_btn_state.setbmp_unclicked(uri_focused);
uri_btn_config.addState(uri_btn_state);
msbf_uri = new MultiStateButtonField(uri_btn_config, new CreateUriTagCommand(), 0, Field.FIELD_HCENTER);
mgr.add(msbf_uri,x1,y1);
msbf_uri.setFocusListener(focus_listener);
MsbConfig sp_btn_config = new MsbConfig();
MsbState sp_btn_state = new MsbState(Constants.BTN_STATE, "Create Smart Poster type tag", "Create Smart Poster type tag");
sp_btn_state.setbmp_focused(sp_focused);
sp_btn_state.setbmp_unfocused(sp_unfocused);
sp_btn_state.setbmp_clicked(sp_clicked);
sp_btn_state.setbmp_unclicked(sp_focused);
sp_btn_config.addState(sp_btn_state);
msbf_sp = new MultiStateButtonField(sp_btn_config, new CreateSpTagCommand(), 0, Field.FIELD_HCENTER);
mgr.add(msbf_sp,x2,y1);
msbf_sp.setFocusListener(focus_listener);
MsbConfig text_btn_config = new MsbConfig();
MsbState text_btn_state = new MsbState(Constants.BTN_STATE, "Create Text type tag", "Create Text type tag");
text_btn_state.setbmp_focused(text_focused);
text_btn_state.setbmp_unfocused(text_unfocused);
text_btn_state.setbmp_clicked(text_clicked);
text_btn_state.setbmp_unclicked(text_focused);
text_btn_config.addState(text_btn_state);
msbf_text = new MultiStateButtonField(text_btn_config, new CreateTextTagCommand(), 0, Field.FIELD_HCENTER);
mgr.add(msbf_text,x1,y2);
msbf_text.setFocusListener(focus_listener);
MsbConfig custom_btn_config = new MsbConfig();
MsbState custom_btn_state = new MsbState(Constants.BTN_STATE, "Create custom type tag", "Create custom type tag");
custom_btn_state.setbmp_focused(custom_focused);
custom_btn_state.setbmp_unfocused(custom_unfocused);
custom_btn_state.setbmp_clicked(custom_clicked);
custom_btn_state.setbmp_unclicked(custom_focused);
custom_btn_config.addState(custom_btn_state);
msbf_custom = new MultiStateButtonField(custom_btn_config, new CreateCustomTagCommand(), 0, Field.FIELD_HCENTER);
mgr.add(msbf_custom,x2,y2);
msbf_custom.setFocusListener(focus_listener);
// mgr.add(ui_msg,x1,10);
add(mgr);