toolBar.setTitleComponent is not spanning to the whole width

23 views
Skip to first unread message

Carlos Verdier

unread,
Jun 30, 2016, 11:49:02 AM6/30/16
to CodenameOne Discussions
Hi

Weirdly enough, ToolBar seems to have changed on device and now toolBar.setTitleComponent is always centered and not filling the entire width of the screen. It's ok on simulator. I'm attaching 2 pictures so you can see the difference on device and simulator.

Any ideas?

Thanks
Device.png
Simulator.png

Shai Almog

unread,
Jul 1, 2016, 1:01:26 AM7/1/16
to CodenameOne Discussions
Hi,
that's my bad. I accidentally pushed in a fix too early to workaround an issue we had in the JavaScript port.
It will act the same way in the simulator with today's release but you would be able to revert to the old behavior using Toolbar.setCenteredDefault(false)

Carlos Verdier

unread,
Jul 1, 2016, 4:46:58 AM7/1/16
to CodenameOne Discussions
Ok, thank you, I'll wait to the new release to revert the behavior.

Shai Almog

unread,
Jul 2, 2016, 12:43:13 AM7/2/16
to CodenameOne Discussions
The new release doesn't revert the behavior but provides an API to do so. Just do an Update Client Libs and call Toolbar.setCenteredDefault(false) in your init(Object) method.
Reply all
Reply to author
Forward
0 new messages