Lazy loading images in a lwuit list - java-me

I am developing an app with LWUIT on J2ME. I have a list that contains images fetched from the web along side some text.
I would like to know how I can lazy load the images so that the form will not freeze while users are trying to interact with it?

Eric Coolman implemented pretty much that in Codename One which is the next generation for LWUIT. Allot of what he wrote can be applied to LWUIT.

Related

How can I take a screenshot (or video) of a rendered Xamarin Forms application?

I need to quickly, and on demand, render a Xamarin forms content page, and take a screenshot of this.
The device I'm taking a screenshot of must be able to render custom dimensions, and ideally honor the device type (Android, iOS, Windows).
What is the most efficient way to render this image, and then take a screenshot of this?
Note: I need to do this dynamically and in near real time. Consider this similar to https://appetize.io but for a completely different purpose

Creating Custom CaptureView Material Design using Storyboard

I am working with the material capture view and I was wondering if there was a way to implement this using a storyboard.
This is tricky, as the CaptureView is a collection of views that would need to be handled in Storyboards. We are making big updates to Audio, Video, and Photo this month that should make using Storyboards more simple.

how to add canvas to the background of a form in j2me

I am new to j2me. I am developing a mobile application in j2me. Is there a way of adding a canvas object to the background of a form? I tried searching in net with few people suggesting to use "jmepolish". I have no idea what jmepolish is..Is there a way to do this with normal j2me classes?
No there's no way to do this. A J2ME form has very limited levels of customisation.
In order to make a fancy looking form that looks exactly as you want, you need to use the Canvas class; this involves doing everything else yourself, i.e. drawing your own input widgets, managing your own user interaction, including scrolling, and any touch screen/gesture stuff if your device supports it.
You can use libraries like J2ME Polish that will do that for you, but even then you will be constrained by what that library supports; and there is an overhead for including the library in your midlet.

What is the best way to design the GUI in javafx 2.0?

In javafx 2.0 it is possible to create the layout by using FXML approach or by using normal java code.
What is the best way with respect to a well designed set of UIs. In my application there is about 100 sub UIs.
Thanks
FXML looks more logical for that purpose. By using FXML
you split business logic from view
you get option to edit design without recompiling project.
you get design as structured xml tree which is much easier to edit comparing to potentially randomly ordered java code
with SceneBuider tool you get an option to use visual editor for your fxml files
Get JavaFX Scenebuilder here.
FXForm2 is a library providing automatic JavaFX 2.0 form generation.
however FXForm2 is not full WYSIWYG GUI design tool.
http://dooapp.github.io/FXForm2/
Scene builder should be a good starting point to create unique UIs of your application. Considering you have 100s of UIs, I assume that some of their "appearances" should be identical with slightly different functions. You can load the FXML dynamically and assign controller at run time. Which means 1 FXML file can be used with multiple controllers. Which can save you some time while keeping the code dynamic for easier maintenance.
FXMLLoader loader = new FXMLLoader(getClass().getResource("DBedit.fxml"));
loader.setController(new DBeditEntityUser());
So, to make use of the same FXML with a different controller.
FXMLLoader loader = new FXMLLoader(getClass().getResource("DBedit.fxml"));
loader.setController(new DBeditEntityUserLevel());
Hope this helps.
fyi,
road map for Java fx http://javafx.com/roadmap/ shows that the scene builder will be released around middle of the year. From the above web page:
"JavaFX Scene Builder is a WYSIWYG GUI design tool for the
JavaFX platform. It enables designing user interface screens by simply
dragging and positioning GUI components from a palette onto a scene.
The tool generates files in FXML format2 that can be used within a project
in any IDE such as NetBeans or Eclipse. The JavaFX Scene Builder can be
used to create GUI for desktop applications and applets that run in a browser."

how to add background in j2me

Now I am developing a mobile application, I have developed menu by Canvas and I get stuck when I try to add background into application.
It means that I need to add background into my application and menu can visible on this background.
I am trying to find the way to add background into j2me, and I use array for menu and I found an example about adding background in J2me using TiledLayer and Layermanager, therefore that I just add these objects into my code for test.
Can it become a background in my code? I can not make it work that way
add background in J2me used TiledLayer and Layermanager
given above, first of all consider using GameCanvas instead of Canvas
public class MainMenu extends GameCanvas //...
Studying some introductory tutorials wouldn't hurt either:
Exploring the Game API of MIDP 2.0
Getting Started With the MIDP 2.0 Game API
By the way both above tutorials provide detailed explanations how to use TiledLayer and LayerManager for adding background

Resources