codename one native google map show in small rectangle - codenameone

I am using Mapcontainer to display native maps on android device. the map container is added to a form which has a text field and a button. When I run this on device the map loads in a very small rectangle as shown in the below image link. How can I increase the map size?
Image link : http://i.stack.imgur.com/y9eBv.jpg

This is caused by placing the map in a form with FlowLayout. Place the map container at the center of a BorderLayout form.
change the form layout to BorderLayout
Move the button and the textfield inside a new container, place this container at the North position of the form.
Place the map container at the center of the form

Related

How to pan google-map-react when there's no space for a popover to be displayed

I'm using google-map-react to show some markers on the map and when the user clicks on the marker some information is displayed in a custom popover made with Reactstrap. But the issue is when the market is near the edge of the map the popover is displayed outside of the map. Is there any way to pan the map automatically when there's no space for the popover? Thanks.
You can check the attached gif for proper understandings

Carousel with thumbnail images at the bottom

In a Codenameone app, I'm trying to develop a carousel with a thumbnail list at the bottom. I've used Tabs control to display files (of diff types like images, video, text, button etc) in carousel style in the center of a form and another Tabs control to display thumbanail images (of the first carousel files) at the bottom of the form. When a user selects a thumbnail image in the bottom carousel, corresponding component should be displayed in the first carousel.
hi.add(BorderLayout.CENTER, mainCarousel);
hi.add(BorderLayout.SOUTH, bottom_tab);
bottom_tab.addSelectionListener((i1, i2) -> {
// bottom_tab.getTabComponentAt(i2).addPointerPressedListener((i) -> {
mainCarousel.getTabComponentAt(i2).setVisible(true);
mainCarousel.getTabComponentAt(i2).repaint();
// });
});
But the component not getting displayed in the central carousel.
Also, I tried to capture the event addPointerPressedListener, but it's not getting fired when I select a thumbnail image.
You can't set tab components to visible/invisible to show/hide them. That won't work. I'm guessing that what you want is a horizontal list for the bottom UI similar to the answer here.
I would suggest using pointer released always. Notice that this will only get delivered to focusable components or the form. To make sure you get the event you can register a pointer release listener on the form.

How can I rebuild Form Component in Codename One

I'm trying to create Custom Form configuration with scrollable TitleArea. The Form (black) has a BoxLayout.Y_AXIS Layout in BorderLayout.CENTER (blue). StatusBar (green) stays in BorderLayout.NORTH (green), when rest of the TitleArea (cyan) is in the first position in BoxLayout.
removeComponentFromForm function is unavailable for using in extended class. How can I remove components from Form to removing titleArea from BorderLayout.NORTH?
Why use the title area at all? Why not just add a component to the top of the box layout Y and style it as a Title that way you can scroll it out?
You can also use the new Toolbar API that includes many abilities to fade out the title as you scroll etc. See:
http://www.codenameone.com/blog/toolbar.html
http://www.codenameone.com/blog/cats-in-toolbars.html

Navigate through big image

I have a big image with coordinate points.
I need to navigate through these points by pressing onscreen buttons.
Only a part of image is seen on the screen at once (shows your location).
By pressing arrow button the view moves to the next part of the same image.
This example looks good.
Please, suggest any way to implement this functionality in Codename One App
Thank You.
You can use the Map component but you can place any image as a label icon within a scrollable container and just let the user use the touch/keys to scroll.

Extjs viewport not rendering

Hi i have a viewport with two region west and center west holds panel for tree and center is a tabpanel iam usin the applyTo:div to render the panels but the problem is the jsp page im rendering to already has a header and footer when i render the viewport it goes out of the browser view and also iam not able scroll down to see all the contents..is some one has any idea about this please help...
As the ExtJS docs state:
The Viewport renders itself to the
document body, and automatically sizes
itself to the size of the browser
viewport and manages window resizing
So you don't need a viewport in this case: just render a panel with a border layout into the same div as you were rendering the viewport. Size the div with CSS so it takes up the area between the header and footer.

Resources