×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Canvas auto added controls

    Hi all,

    when i display canvas in my j2me app - controls automatically aded at the bottom of the screen - how i can prevent this behaviour?

    And 2n question - how to process touch key in j2me? Is there any possibility?

    PS phone is Nokia 5230

    Thanks!

  2. #2
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: Canvas auto added controls

    Quote Originally Posted by rukus View Post
    Hi all,

    when i display canvas in my j2me app - controls automatically aded at the bottom of the screen - how i can prevent this behaviour?

    And 2n question - how to process touch key in j2me? Is there any possibility?



    PS phone is Nokia 5230

    Thanks!
    rukus, welcome to the Forum Nokia Discussion Boards..

    1. I guess by the controls means that you are talking about the strip that is coming on the bottom of the screen. May be the Exit command is there by default?

    In the constructor of the Canvas, you just add the line, setFullScreenMode(true), you will be get rid of the same

    2. You can know whether the device supports the touch event like this,

    public boolean hasPointerEvents()

    Checks if the platform supports pointer press and release events.

    Returns:
    true if the device supports pointer events
    Now if yes, the Canvas class provides three notification methods: pointerPressed(), pointerDragged(), and pointerReleased(). These methods work similarly to the key event methods, except that they provide two integer parameters, denoting the x and y position of the pointer when the corresponding event occurs.


    public void pressPointer (int x, int y) {
    action = "Pointer Pressed";
    this.x = x;
    this.y = y;
    repaint ();
    }

    is used to initialize the pointer location when pressed.
    public void releasePointer (int x, int y) {
    action = "Pointer Released";
    this.x = x;
    this.y = y;
    repaint ();
    }

    is used to released the pointer from his location.
    public void dragPointer (int x, int y) {
    action = "Pointer Repeated";
    this.x = x;
    this.y = y;
    repaint ();
    }
    You can print the x, y and the action on some Canvas and check.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  3. #3
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: Canvas auto added controls

    Hi raj - grat answer, but i'm already using full screen in some screens and controls added anyway - please look at http://img152.imageshack.us/img152/8877/2611102212.jpg

  4. #4
    Nokia Developer Expert
    Join Date
    Aug 2007
    Posts
    1,595

    Re: Canvas auto added controls

    Hello rukus,

    I can see that you are referring to the on-screen keypad which will be set on by default for Canvas applications in Symbian touch screen devices which lack physical keyboard for user input.

    The visibility of the on-screen keypad can be controlled by using the JAD attribute Nokia-MIDlet-On-Screen-Keypad. The possible values for the attribute include:
    no (removes the keypad), gameactions (Game actions keypad: game actions UP, DOWN, LEFT, RIGHT, FIRE, GAME_A, GAME_B GAME_C and GAME_D) and navigationkeys (Navigation keys keypad: game actions UP, DOWN, LEFT, RIGHT and FIRE).

    So you can remove the keypad by setting the following attribute and value pair in the JAD file:

    Nokia-MIDlet-On-Screen-Keypad: no

    More about the on-screen keypad on

    -Forum Nokia Wiki:

    Using on-screen keypad in MIDlets in S60 5th Edition


    -Forum Nokia Java Developer's Library:


    Java Developer's Library 3.6 > Developer's Guides > UI and graphics > Touch UI > Touch interaction in Symbian > On-screen keypad (OSK)


    Java Developer's Library 3.6 > Developer's Guides > UI and graphics > Touch UI > Touch interaction in Symbian > On-screen keypad (OSK) > OSK on devices with no keyboard


    Java Developer's Library 3.6 > Developer's Guides > Application framework > JAD and JAR manifest attributes


    Regards,
    r2j7
    [URL="http://library.forum.nokia.com/java"][B] >>> Java Developer's Library <<<[/B][/URL]
    [URL="https://www.developer.nokia.com/Resources/Support/Technical_support.xhtml"] [B]>>> Technical Support for Java ME development <<<[/B][/URL]
    [URL="https://publish.ovi.com/info/"][B]>>> Nokia Publish: reach millions of Nokia users worldwide through Nokia Store <<<[/B][/URL]

  5. #5
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: Canvas auto added controls

    Thank you so much, raj - that's what i've needed

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: Canvas auto added controls

    hmmm - but i have one more problem - when i go fullscreen - softkey menu didn't show as usual... for some reasons it's ok but for one screen i want to hide top menu (where is time, signal strength & battery info) and have softkey menu - is it possible? i found some solutions for qt but it's not java...

  7. #7
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Canvas auto added controls

    Quote Originally Posted by rukus View Post
    hmmm - but i have one more problem - when i go fullscreen - softkey menu didn't show as usual... for some reasons it's ok but for one screen i want to hide top menu (where is time, signal strength & battery info) and have softkey menu - is it possible? i found some solutions for qt but it's not java...
    Which Device are you talking about?

    What all you can remove is just using the setfullscreenmode(true), I suspect that if you can get rid of the icons that you are talking about.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  8. #8
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: Canvas auto added controls

    Nokia 5230
    setting sullscreenmode(true) removes softkey menu (which i want to stay) and battery info (which i want to remove).

  9. #9
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Re: Canvas auto added controls

    Quote Originally Posted by rukus View Post
    Nokia 5230
    setting sullscreenmode(true) removes softkey menu (which i want to stay) and battery info (which i want to remove).
    AFAIK not possible.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  10. #10
    Registered User
    Join Date
    Nov 2010
    Posts
    7

    Re: Canvas auto added controls

    Thanks raj - you helped me a lot

Similar Threads

  1. problem occuring when the image is added on the canvas
    By ritusingh in forum Mobile Java General
    Replies: 8
    Last Post: 2010-02-25, 06:27
  2. Mixing native controls from UI Design Editor with custom controls
    By elviin in forum Symbian User Interface
    Replies: 1
    Last Post: 2009-05-12, 07:39
  3. Reading the control stack priority of added controls
    By LavanyaSpm in forum Symbian User Interface
    Replies: 0
    Last Post: 2009-02-11, 12:27
  4. Callback to UI controls other than canvas?
    By k_shemyak in forum Symbian
    Replies: 0
    Last Post: 2009-01-07, 13:47
  5. Auto rotate Canvas on N95
    By hweIPSQUARE in forum Mobile Java Media (Graphics & Sounds)
    Replies: 1
    Last Post: 2008-06-04, 09:06

Posting Permissions

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