When a Preference is modified through the right side Toolbar Menu Form, the ToastBar message confirmation is shown to the Form beneath it - codenameone

I have added the possibility to change a Preferences setting directly in the right side Toolbar. It works fine. However, the ToastBar confirmation messages are shown beneath the Toolbar Form rendering it effectively useless...
Is there a way to bring forth the ToastBar messages?

I suggest using useFormLayeredPane(true) when showing the toast. You can toggle this globally using:
ToastBar.getInstance().useFormLayeredPane(true);

Related

SideMenu and tabs screen issue

I've a couple of tabs in a form. If I open side menu and try to slide the side menu out, rather than closing the side menu the components of the tabs move. How can I solve it?
Have a look at the video here.
This is probably a bug we should find a way to fix. However, I'm not sure if we can do so easily as both the tabs and side menu rely on the pointer event listeners of the parent Form.
I'm afraid that at this time the only workaround is to disable tab swiping.

codenameone autocomplete text field display issue in gui

I m working on my mobile apps using codename1 and i found that after adding an autocomplete textfield to any form, every other component disapears along with tabs behind a white container.
It sounds like you are using a scrollable FlowLayout (which is the default layout manager) and some nesting behavior goes bad.
Another guess is that you add everything into the layered pane which is a HUGE MISTAKE, you should add everything to the form directly or content pane.

Making a basic navigation for iOS with two buttons on both sides of the title

I am working on codenameone, and trying to make the first UI.
A basic UI with a title and two buttons on two sides of the "title" to go to two different pages.
I was trying to do that with "Form" component but then it only gives one button by default, which is just taking me to the previous screen.
Not sure how to do this, any link or tip is a nice help.
thanks
Use addCommand(new Command("X")) or in the GUI builder just click the commands property in the form. It will automatically use the menu for Android.
The back button is added automatically for iOS apps for back navigation which you will probably need. You can disable it in the state machine code and have room for two commands in the title.

Reacting to StylusDown in control's UI?

I'm building a touch screen application in WPF and I'm wanting to show a change in UI when the user presses a button with their finger/stylus. Currently you only get a flicker of UI change once the finger is released but nothing before that.
I've been trying to hook up triggers and/or eventtriggers in the button template to things like stylusdown and touchdown but to no avail.
I've hooked up some console writes on events attached to a button and they appear in the following order:
StylusDown
StylusButtonDown
TouchDown
StylusUp
StylusButtonUp
Click
All of which firing at the same time when the finger is lifted from the screen. (TouchUp doesn't seem to fire at all).
Any ideas on how I could begin to capture a finger pressing onto a button in the template so I can give the user some idea that they are actually pressing a button?
After blogging in more detail about this issue I had a comment recommending using a SurfaceWindow and then SurfaceButtons from the Surface Toolkit (currently in Beta) and now all is working as I would expect.
Update: The link is now dead. Here's the link to that page from Wayback Machine.

How to force IE7 toolbars to always show

I have the developer toolbar for IE7, which is great when I want to inspect the page layout in a fashion similar to the functionality of firebug for firefox.
However I am working with a web site that opens a new window with the toolbars disabled, and I cannot access my dev toolbar button! Is there a way to force IE7 to always show the toolbar?
I don't believe you can.
You can recover the navigation toolbar (back, forward, address bar, search box) in a chromeless window (one opened without navigation toolbar, menus, other toolbars) by hitting F11, then F11 again, but that still doesn't give you access to the IE Developer Toolbar.
What will sometimes work is to hit CTRL+N while the new, chromeless window has focus. Doing that will open a new chromed (toolbars, menus, etc) to the same URL as the chromeless window. The trick won't work very well if the chromeless window URL is the result of a POST, or does a GET that modifies state in some way on the server.
I imagine that this happens because the pop-up window is opened using a javascript window.open() call specifying not to have the toolbars on the new window?
One possibility is opening the page source, finding the javascript call that opens the window, and pasting it into the address bar, modifying it to not disable toolbars.
For example, if the call currently looks like:
window.open(url, "newWindow", "toolbar=no,width=500,...");
Edit the address bar to read something like:
javascript:window.open(url, "newWindow", "toolbar=yes,width=500,...");
When you push enter on that, it should pop up the window just the same, but with toolbars.
IE8 has the dev toolbar built-in, so you can always access it via F12. Consider upgrading?

Resources