Peace upon you,
displaying gif is a common problem in j2me if u search about it in google u will find many classes used to encode gif but it's simply as shown in this code:
player = Manager.createPlayer(getClass().getResourceAsStream("/Image path"),
"image/gif");
player.realize();
if ((vidc = (VideoControl) player.getControl("VideoControl")) != null) {
videoItem = (Item) vidc.initDisplayMode(VideoControl.USE_GUI_PRIMITIVE, null);
//vidc.setDisplaySize(240, 140);
}
append(videoItem);
midlet.getDisplay().setCurrent(this);
while (true) {
player.start();
}
Enjoy
Happy coding;-)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment