Results 1 to 5 of 5

Thread: Close actionsheets by sliding (dragging with finger)

  1. #1
    Sencha User
    Join Date
    Jul 2009
    Posts
    165
    Vote Rating
    2
      0  

    Default Answered: Close actionsheets by sliding (dragging with finger)

    Hello friends!
    I have the following code:

    Code:
    Ext.define('PodiAdmin.view.HeaderToolbarViewController', {
        extend: 'Ext.app.ViewController',
        alias: 'controller.headertoolbar',
    
    
        init: function() {
            this.menu = Ext.create({
                xtype: 'actionsheet',
                displayed: false,
                side: 'left',
                reveal: true,
                items: [{
                    text: 'Settings',
                    iconCls: 'x-fa fa-gear',
                    scope: this,
                    handler: 'hideMenu'
                }, {
                    text: 'New Item',
                    iconCls: 'x-fa fa-pencil',
                    scope: this,
                    handler: 'hideMenu'
                }]
            });
        },
    
         onMenuItemTap: function(button, e, eOpts) {        var menu = this.menu;
            menu.setConfig({
                side: 'left',
                reveal: false,
                cover: true
            });
            menu.setDisplayed(!menu.getDisplayed());
        }
    ...
    ...
    I would like to close the menu sliding (dragging with the finger) the menu to the left side.
    Actually only is possible to close the menu with the close button and taping the masked main panel.
    Some suggestion, please?? Thanks a lot!!!

  2. Listen for the swipe event on the menu then hide it. Quick Example:


  3. #2
    Sencha User
    Join Date
    Jul 2009
    Posts
    165
    Vote Rating
    2
      0  

    Default

    Some suggestion, please?
    I believe that this is a very common feature ... currently all mobile applications allow you to close the menu by sliding your finger.

  4. #3
    Sencha User
    Join Date
    Jul 2009
    Posts
    165
    Vote Rating
    2
      0  

    Default Closing menú (actionsheets) by sliding finger

    Me again... somebody can help me? Maybe my english isn't good or Google Translator didn't do a good job!
    I just want to be able to close the menu of my mobile application by sliding my finger, currently, to close it I have to select an option or click outside the menu.

  5. #4
    Sencha Premium User
    Join Date
    Feb 2010
    Location
    Chicago
    Posts
    66
    Answers
    16
    Vote Rating
    12
      0  

    Default

    Listen for the swipe event on the menu then hide it. Quick Example:


  6. #5
    Sencha User
    Join Date
    Jul 2009
    Posts
    165
    Vote Rating
    2
      0  

    Default

    That's works!!!! Thank you Johnny!!

Tags for this Thread

Posting Permissions

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