You Are Here:

Community: Developer Discussion Boards

#1 Old Image not showing up on target device, Nokia 7610 - 2006-06-30, 23:58

Join Date: Jun 2006
Posts: 5
shufeilei
Offline
Registered User
I am programming an application in J2ME for Nokia 7610. I am trying to append an ImageItem to a form.

ImageItem image = new ImageItem ("Image", Image.createImage("/image.png"), ImageItem.LAYOUT_CENTER, null);
form.append (image);

The image shows up on the emulator fine. When I install it on the target device (Nokia 7610), the image does not show up.

I am pretty new to J2ME, so I hope someone would have answer to this question. Thank you!

Shufei
Reply With Quote

#2 Old Re: Image not showing up on target device, Nokia 7610 - 2006-07-01, 00:52

Join Date: Jun 2006
Posts: 5
shufeilei
Offline
Registered User
I figured out what was wrong. The image was too big fo rthe screen. When I replace the image with a smaller image, it shows up. It would be helpful if there was some sort of error that tells me that the image has exceed the display's boundary. However, I think it's the programmer's responsibility to make sure that the image will fit.

Shufei
Reply With Quote

#3 Old Re: Image not showing up on target device, Nokia 7610 - 2006-07-01, 03:18

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
Hi Shufei,

I'm newbe too,
if you would use "altText" string when creating ImageItem isntead setting is to null in your constructor you will see that string on device screen - as to midp specification is exactly for that reason - when image is too big for screen,

also you can use the same image for various device screen sizes I believe and simply scale it down/up accordingly to current screen width/height:
http://forum.java.sun.com/thread.jsp...sageID=4053281
http://www.java-tips.org/java-me-tip...-zoom-out.html

if you create for MIDP 1.0 then image need to be converted to immutable type - in MIPD 2.0 you can use mutable or immutable for ImageItem,

regards,
Peter
Reply With Quote

#4 Old Re: Image not showing up on target device, Nokia 7610 - 2006-07-07, 11:45

Join Date: Dec 2005
Posts: 62
rak_eshz
Offline
Regular Contributor
hi ,

u just put " try -catch " for that code for creating and appending the image item and find if any exception is throwing or not.


regards
rakesh
Reply With Quote

#5 Old Re: Image not showing up on target device, Nokia 7610 - 2006-07-07, 23:43

Join Date: Dec 2005
Posts: 1,696
Location: Europe/Poland/Warsaw
peterblazejewicz
Offline
Super Contributor
hi,
@rakesh
AFAIK there is no exception for ImageItem constructor for that type of issue,
only for item layout argument and type of appearence,
possible issue is decribed in MIPD:
Quote:
The altText parameter specifies a string to be displayed in place of the image if the image exceeds the capacity of the display. The altText parameter may be null.
if we pass null as altText it could happen that we will see nothing,

regards,
peter
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump
Similar Threads
Thread Thread Starter Forum Replies Last Post
About the nokia doc: A MIDlet Example Using the Wireless Messaging API ... SStefano Mobile Java Tools & SDKs 2 2008-04-03 20:02
Bluetooth Security: What exactly is an untrusted device? rahulmcs Bluetooth Technology 1 2005-12-02 07:26
Authentication for DM Client on Nokia 7610 jclaudius OMA DM/DS/CP 2 2004-07-27 14:14
Series 60Series 60 MIDP Concept SDK Beta 0.2 Linux bug? kauppi Mobile Java Tools & SDKs 3 2003-04-07 10:05
GDB Remote Target debug on Nokia 3650 danjh@xetron.com Symbian Tools & SDKs 2 2003-03-27 16:24

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia