0

How make the widget fullscreen

How make the widget fullscreen? Currently the area of background screen become smaller and bigger on using the fullscreen button in the widget.

by
4 Replies
  • In your widget view, extend from KONtx.system.FullscreenView instead of KONtx.system.SidebarView.

    -Jeremy
    0
  • I've extended from KONtx.system.FullscreenView and added a full screen background. How do I now take complete control of this view and add my own html layout, keyhandler and functionality ?
    0
  • QUOTE (lee.bettridge @ May 1 2009, 06:26 AM) <{POST_SNAPBACK}>
    I've extended from KONtx.system.FullscreenView and added a full screen background. How do I now take complete control of this view and add my own html layout, keyhandler and functionality ?


    1.) There is no "html" support in widgets.

    2.) Ideally, for keyhandler you should listen to the Application event which fires key press events. An example is:

    CODE
    // inside your view class

    _myKeyHandler: function(event) {
    // eventPhase 3 is a keyDown event. this is typically the only one you should care about
    if(event.payload.eventPhase != 3) return;

    var keyCode = event.payload.keyCode;

    // do something with the keycode from the keypress
    },

    updateView: function() {
    this._boundKeyListener = this._myKeyHandler.subscribeTo(KONtx.application, 'onWidgetKeyPress', this);
    },

    hideView: function() {
    this. _boundKeyListener.unsubscribeFrom(KONtx.application, 'onWidgetKeyPress');
    },


    3.) As far as functionality goes, you add elements on the page inside createView / updateView like you would with any other view and tie the elements (like buttons, grids, etc) to functions inside your view which handle that respective action.
    0
  • Thanks Jeremy.
    0

Recent Posts

in General - Yahoo! TV Widgets