Compte Gmail
Compte Gmail

Reputation: 137

Button Not Showing Codenameone

I'm trying the charts class, I'm trying to display a return button but it's not displaying. Here's the full code. Please feel free to edit it in case you can help.

I also thought about an easier solution, a toolbar but where can I put it because I tried and it didn't display the button?!

getToolbar().addMaterialCommandToLeftBar("", FontImage.MATERIAL_ARROW_BACK, e-> previous.showBack());

OUTPUT: enter image description here

Here's the code: CODE

Upvotes: 2

Views: 59

Answers (2)

Chen
Chen

Reputation: 3760

Try this:

getToolbar().setBackCommand("", e-> previous.showBack());

Upvotes: 2

P5music
P5music

Reputation: 3327

Maybe this works

toolbar=new Toolbar();
toolbar.setTitle(titleString);
form.setToolbar(toolbar);
toolbar.setEnabled(true);
toolbar.addMaterialCommandToLeftBar("", FontImage.MATERIAL_ARROW_BACK, e-> previous.showBack());
toolbar.showToolbar();

Upvotes: 0

Related Questions