Hi,
Im using a MultiList to display some result from a web service but the
address is not showing up completely.
Please see the attached picture.
The first address should be "*Jalan Gertak Merah, 80000 Johor Bahru, Johor,
Malaysia" *and not "*Jalan Gertak Merah, 80"*
How can I correct this please.
*This is my code:*
Style s = UIManager.getInstance().getComponentStyle("Button"); FontImage p
= FontImage.createMaterial(FontImage.MATERIAL_PORTRAIT, s); EncodedImage
placeholder = EncodedImage.createFromImage(p.scaled(p.getWidth() * 3,
p.getHeight() * 4), false); f.setTitle("Tourist Attractions");
getattractive(); ArrayList arr = (ArrayList) response.get("results"); for
(Object m : arr) { Map ma = (Map) m; address = (String)
ma.get("formatted_address"); name = (String) ma.get("name"); icon =
(String) ma.get("icon"); data.add(createListEntry(name, address, icon)); }
DefaultListModel<Map<String, Object>> model = new DefaultListModel<>(data);
MultiList ml = new MultiList(model);
ml.getUnselectedButton().setIconName("icon_URLImage");
ml.getSelectedButton().setIconName("icon_URLImage");
ml.getUnselectedButton().setIcon(placeholder);
ml.getSelectedButton().setIcon(placeholder);
findContainer(f).add(BorderLayout.CENTER, ml); c.addComponent(bn);
bn.addActionListener((ActionEvent evt) -> { System.exit(0); });
findContainer(f).add(BorderLayout.SOUTH, c);
f.getComponentForm().revalidate(); break;
--
You received this message because you are subscribed to the Google Groups
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit
https://groups.google.com/d/msgid/codenameone-discussions/cf948b92-dcbf-42ed-b8b6-7f0fcedd8acb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.