在sencha touch2中没有覆盖图像

时间:2012-07-09 10:43:02

标签: sencha-touch sencha-touch-2

我想在图像上显示叠加效果。但它没有显示出来。我的代码中的错误是什么?任何人都可以告诉我如何在图像上显示叠加效果。

这是我的代码:

  {
      xtype: 'image',
      src: 'http://www.veryicon.com/icon/preview/System/Colored%20Developers%20Button/question%20Yellow%20Icon.jpg',
      listeners: {
                 tap: function () {
                  var popup = Ext.create('Ext.Panel', {
                  modal: true,
                  centered: true,
                  width: 300,
                  height: 400,
                  layout: 'fit',                                                                
                  scrollable: true
                 });
                popup.show();
               }
              },
       height: 32,
       width: 32
    }

1 个答案:

答案 0 :(得分:1)

试试这段代码

{
  xtype: 'image',
  src: 'http://www.veryicon.com/icon/preview/System/Colored%20Developers%20Button/question%20Yellow%20Icon.jpg',
  listeners: {
             tap: function (ele) {
              var popup = Ext.create('Ext.Panel', {
              modal: true,
              centered: true,
              width: 300,
              height: 400,
              layout: 'fit',                                                                
              scrollable: true
             });
            popup.showBy(ele);
           }
          },
   height: 32,
   width: 32
}