CodenameOne Image Slider using Image Viewer - codenameone

Is it possible to achieve something similar to the attachment using imageviewer. I already have images loaded using the DefaultListModel but I would like something similar to the screenshot where part of the next image shows so the user knows there is a next image and if possible the slider at the bottom of the screen.
Thanks

Most of the people who did that used the Tabs widget which is more suitable for that sort of usage. You can see some discussion of this here:
https://groups.google.com/d/msg/codenameone-discussions/06hLjMkia-4/4oi4wBaMKe0J

Related

Is it possible to change user's phone orientation using react?

I have the next question. I am developing a react application with some images. The user has the possibility to click and open a full-page image. Because the image's orientation is horizontal on the mobile, it does not look good. My idea is when the user clicks on the full page icon, the orientation of the phone becomes horizontal as is implemented on youtube. I tried to find some information about that, but I am not sure if it is even possible, I saw that only by using react native and developing mobile applications you can have access to the user's orientation of the screen. But maybe there are some methods to do in the browser? Thanks in advance.
It is not possible to change this from the web, however you could simply rotate the image and display it full screen. This has been done here:
CSS Rotate Portrait Image 90 Degrees and Make Image Full Screen

how to add an different photo in calendar using react(Not mobile)

I'm trying to different image in calendar, also I want to get preview image.
But Google calendar seems not to support preview image.
So I implemented the following in the code sandbox, but when I use map, of course, the same image comes out repeatedly. Can't I add other images?
Codesandbox: https://codesandbox.io/s/frosty-frost-sv7d66?file=/src/App.js
I want to get like this.

Place Image above another image dynamically in ReactNative App

I have an iOS app in which, we take user pics, and then allowed them to put some random custom images above the pics.
While placing these custom pics above real image, they can rotate, scale these custom image. ( See this StickerViewIOS )
Now I am looking for exact same solution while making ReactNative.
Tried lot of Googling but no results found.
Just want to ask community if any of the ReactNative component available for the same.
Thanks,
There's no rotation support, but I did something similar for an app I made for Chain React.
Here's the image component that supports gestures: https://github.com/cball/ChainReactPhotobomb/blob/master/App/Components/TransformableImage.js
To overlay them on top, just use the ImageBackground Component

Display HTML in Boxlayout

I want to display HTML in my forms. The problem is I have to use a Boxlayout to place my components. So when I put a WebBrowser I'll have some height and scroll issues. I get the HTML I want to display from a webservice. The length of the content is variable. I just want to display a part of this response. Here is what I already have:
The webBrowser is below the edit button and ends near the LBL_LIB_NOM label.
As you can see the webBrowser is way too high and I can't scroll the Form when I click over the WebBrowser. In this example I would like to reduce the size of the WebBrowser so we can only see the Title. I also would like if possible to scroll my form when I click on the WebBrowser since I don't want the WebBrowser to scroll.
I have tried a few things to solve my issue:
I tried to override the calcPreferredSize method.
I revalidate my form and my webbrowser.
I resized it's container using the deprecated setPreferedSize method.
In that case the container is well sized but the the WebBrowser displays
above the other components.
The usual answer I have seen in other posts is to put the WebBrowser in a BorderLayout but I can't do that.
So here is my question: Is there any other component I can use to display one HTML line ? Or is there a way to make a webBrowser work properly in a boxLayout ? Do I have to write my own HTML renderer ?
I'm guessing you want box layout so you can scroll... This is problematic.
Web views generally expect to scroll themselves and this is common in native widgets which handle their own events and thus scrolling. It's hard for our code to know when your swipe is intended for us or to the underlying native widget and it's harder still to do this in a consistently portable way.
There are 3 options:
Use only Codename One code
Use a border layout or similar layout
Use the web browser for the entire UI of this form
If you want to take the first option this article might be useful as a starting point.

jfree chart savechartaspng utility not getting new chart

i am using jfree chart to generate pie chart dynamically, but i have problem. When i need to show output on IE6, the chart is not getting refreshed. i need to close the and reopen the browser and then input new value
Can anyone suggest what could be solution for the above problem?
It sounds like you are having caching issues. I assume your chart is loaded from an image tag. If the address for the image tag is the same then IE will cache the image to speed up future loads. There are several general methods to prevent this.
how to clear or replace a cached image
Disable cache for some images
Also note that the image won't change without some type of new request, be it a page refresh or some type of AJAX polling. W3 Schools Info

Resources