×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Show alert as dialog with icon from the theme file in lcdui?

    How can I show alert as a dialog and use icon from the theme resource? Maybe this should be separate question, but what I'd like is something like this

    This image is taken right from the documentation of Alert, but unfortunately the doc doesn't say how to achieve this. I am quite unsatisfied with the doc though, too many things are left unsaid.

  2. #2
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Show alert as dialog with icon from the theme file in lcdui?

    You create a new Alert class with AlertType.INFO. I am not sure, I did get your question: Did that help?

  3. #3
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: Show alert as dialog with icon from the theme file in lcdui?

    I did use the AlertType.INFO, the icon didn't show. I am using below code to show
    Alert alert = new Alert(title, e.getMessage(), null, AlertType.ERROR);
    javax.microedition.lcdui.Display display = javax.microedition.lcdui.Display.getDisplay(midlet);
    display.setCurrent(alert);

    This will be full screen and show a "Done" button, not the dialog. And again, no icon.

  4. #4
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Show alert as dialog with icon from the theme file in lcdui?

    I would not bother too much as this is intended. Anyway, your picture shows a non-modal alert – I hate them because the user has to watch the screen all time. To get a modal alert, try to reduce the text and/or set the timeout to something else than Alert.FOREVER.

  5. #5
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: Show alert as dialog with icon from the theme file in lcdui?

    Quote Originally Posted by traud View Post
    I would not bother too much as this is intended. Anyway, your picture shows a non-modal alert – I hate them because the user has to watch the screen all time. To get a modal alert, try to reduce the text and/or set the timeout to something else than Alert.FOREVER.
    Actually my screenshot shows a modal dialog. And my code is not using the Alert.FOREVER parameter, in my code, the alert will disappear after 3 seconds. And the modal dialog is more inline with the UX guildlines. But anyway, i would not put too much energy into this.

  6. #6
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Show alert as dialog with icon from the theme file in lcdui?

    Sorry, but your pictures shows a dialogue without any button = non-modal. Although Nokia loves non-modal dialogues, they are a UX disaster and should not be copied. For example, you have a very long operation and on failure, the user looks up or puts the device away, a non-modal dialogue appears, and disappears. It got missed.

    Anyway, I do not see much you can do wrong with Alerts. Either it works or not. Did you test this in a Series 40 emulator, like the one of Nokia 305? Or was this the new Asha software platform (Nokia 501)?

  7. #7
    Registered User
    Join Date
    Apr 2013
    Posts
    65

    Re: Show alert as dialog with icon from the theme file in lcdui?

    I am using the Asha 501 emulator, now I know why, the document clearly specifies that now the alerts is a full screen component instead of a dialog.
    So issue solved, although I am pretty confused now that there is no default icon now, but that's OK. Thanks for pointing it out.

  8. #8
    Nokia Developer Champion
    Join Date
    Mar 2003
    Posts
    4,105

    Re: Show alert as dialog with icon from the theme file in lcdui?

    My fault. From your other questions I should have realised you are on the new Asha software platform. Your picture was simply a Series 40 Full-Touch and I went the wrong direction.

Similar Threads

  1. How to show connection dialog without show View in GUI app (main app)
    By hariyanto_toto in forum Symbian User Interface
    Replies: 1
    Last Post: 2010-12-06, 06:58
  2. LCDUI Alert on an LWUIT Form
    By slugger_2003 in forum Mobile Java General
    Replies: 0
    Last Post: 2010-04-18, 13:01
  3. How to display an alert with guage Component in LCDUI?
    By neeraja.nokia in forum Mobile Java General
    Replies: 3
    Last Post: 2009-03-24, 11:45
  4. Can we show a new screen after an alert
    By shail229 in forum Symbian
    Replies: 9
    Last Post: 2008-06-25, 12:58
  5. Show text(file) in dialog
    By mhakkara in forum Symbian User Interface
    Replies: 2
    Last Post: 2005-03-16, 06:00

Posting Permissions

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