Results 1 to 18 of 18
  1.    #1  
    Hi,

    I try to resize my background when a notification (icon, banner etc.) is present in the Palm Pre dashboard.

    Is it possible to find out that a notification is currently present?

    When yes, how?

    Thx for your support!
  2. #2  
    You just need to react to window.onresize
  3.    #3  
    Yes, but how can I find out that a notification is currently present particularly when the app is in the fullscreen mode (or in deactivate mode)...

    The resize function itself or to trigger the actions is not the problem.
  4. #4  
    Perhaps I'm not understanding what you're looking for? It sounded as if you want to react when the notification or dashboard changes the size of your currently active application. Is that accurate? The window.onresize is an event you can bind to just like you can bind to an onTap or an onFlick.

    Or are you looking for the state of existing applications that are in the process of doing Notifications or using Dashboards?
  5. #5  
    You shouldn't rely on an event to resize your screen. It will delay the redraw unnecessarily.

    It's best to do it with CSS. You can fix elements to the bottom of the scene and they will auto-adjust when notifications pop up.

    You'll want to use the following css properties...

    Code:
    position: fixed;
    bottom: 0px;
    Of course, you can set the bottom property to something different if you don't want your elements exactly on the bottom.

    For example, in this scene, the DIV that contains the bottom control bar is styled with the properties I mentioned. Whenever one or more notifications or the volume display comes up, the DIV automatically moves up to adjust. It happens instantly whereas waiting on an event would have a visible delay.

    Last edited by Blubble; 08/12/2010 at 05:36 PM.
  6.    #6  
    thx for your answers!!

    Here is a short explanation:
    What I want to do is to resize the complete background image.
    Particularly when the app is in deactivated.
    Therefore it is necessary to know if there is an notfication is currently present or not.
    Depending on whether its true or not, die resize scale is different.

    @Blubble
    I know the "window.resize" event! Button I think your example only works when the application (scene) is not in the fullscreen mode.
  7.    #7  
    Or are you looking for the state of existing applications that are in the process of doing Notifications or using Dashboards?
    Yes
  8. #8  
    You can use -webkit-background-size set to percentage values to have your background automatically resize.
    danNielson.com - Slalom - twitter - facebook
    A posted thanks dies with the thread. Clicking the button lasts until the admins get bored with this site and throw it in the recycling bin.
  9.    #9  
    Thats not possible because I draw my image with a canvas for my background...

    My question is not based on "how can I resize my background="
    but rather "How can I detect if notifications are present?"
  10. #10  
    you can't detect the window size when the card is minimized, you can only detect it when the window is maximized
    when the card is minimized the "resize event" doesn't work correctly and the height is always 452.
  11. #11  
    on the same line this.controller.stageController.deactivate();
    doesn't work either
  12.    #12  
    sorry for my bad english, but I think im too vague.

    I don't wan't to detect the window size (I know it already).
    I only what to know if a notification is present or not.
    Because, when the card is minimized the scale of the canvas image is diffentent with notification than without

    when the card is minimized the "resize event" doesn't work correctly and the height is always 452.
    EDIT: that's true, but the position of the card is different when a notification is available or not
    Last edited by Esche; 08/13/2010 at 03:05 PM.
  13. #13  
    yes I know the position is different, that's my point when In full screen the resize event will give you different window sizes from which you van calculate if a notification is present, however when minimized the resize event always returns the same size 452 so you cannot determin if a notification is present
  14.    #14  
    Are you sure, that the resize event is even called in fullscreen-mode?
    I thought that notifications are not visible when the fullscreen-mode is activated?
  15. #15  
    Quote Originally Posted by abegee View Post
    yes I know the position is different, that's my point when In full screen the resize event will give you different window sizes from which you van calculate if a notification is present, however when minimized the resize event always returns the same size 452 so you cannot determin if a notification is present
    Did you confirm the 452 for only the Pre? Does it always report 372 for the Pixi? Those numbers would make sense to me, because that would be the size of the card that you are responsible for writing to when you are in card view mode, with webOS automatically providing a smaller and smaller zoom of that 452 x 320 card (on the Pre) depending upon the number of banners showing and the type of zoom view currently active (normal card view or tiny card view).
  16.    #16  
    Yes I can confirm the 452 for the Pre!

    It's a problem to get the correct result (when the card is in "normal" or "tiny" view) with the resize event, but when the card is in fullscreen mode....
  17. #17  
    That's what I guessed you were working towards. I think "Clear Card" tries to do a similar job.
  18. #18  
    Quote Originally Posted by appsotutely View Post
    That's what I guessed you were working towards. I think "Clear Card" tries to do a similar job.
    You are correct.

    I have not discovered a way to do so.
    Check out my apps at clearwaterapps.com

Posting Permissions