Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User erracid8's Avatar
    Join Date
    Jul 2004
    Posts
    22
    Good day.

    I made a Midlet MIDP 1.0 CLDC 1.0 that have an Image on Alert class:
    this is my code:

    Alert al = new Alert("AppTitle");
    try {
    al.setImage(Image.createImage("/MyApp/myimg.jpg"));
    } catch (java.io.IOException e) {
    }
    al.setTimeout(3000);
    al.setType(AlertType.INFO);
    display.setCurrent(al);

    On Nokia Phones (I've tried Series 40 e 60) the result is that I view on text area Information and near of it (but cutted) the image.

    Why?

    I have another question:
    If I use on Alert class
    al.setString("MyApp\nMyName");
    within or eithout image On Nokia phones the "\n" idn't considered.


    Both problems in others phones (I've tried Motorola and Sony-Ericsson) aren't.

    Why?


    Best regards and good work.

    Stefano Errani

  2. #2
    Nokia Developer Moderator r2j7's Avatar
    Join Date
    Aug 2007
    Posts
    1,595
    Hello Stefano Errani,

    ..I view on text area Information and near of it (but cutted) the image.
    What's the size of the image?

    al.setString("MyApp\nMyName");
    ..On Nokia phones the "\n" idn't considered.
    Have you tried:

    al.setString("MyApp\n"+"MyName");

    Regards,
    r2j7

  3. #3
    Registered User erracid8's Avatar
    Join Date
    Jul 2004
    Posts
    22
    Good day.

    >>>>What's the size of the image?

    The resolution of image is 128x96 pixel.

    >>>>Have you tried:
    >>>>al.setString("MyApp\n"+"MyName");

    My real string is:
    String aboutText = getAppProperty("MIDlet-Name") + " " + getAppProperty("MIDlet-Version") + "\nby " + getAppProperty("MIDlet-Vendor") + "\n" + getAppProperty("DateVersion") + "\n" + getAppProperty("SiteAuthor");


    Best regards and good work.

    Stefano Errani

Similar Threads

  1. Problem for viewing Image and "\n" on Alert
    By erracid8 in forum Mobile Java General
    Replies: 0
    Last Post: 2008-01-31, 00:47

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved