2

I have simple view with info for the user. When I tap on phone number I'm able to call to that number, and it's OK.
When I tap on user number in the titlebar I also able to call to that number. The user number is not a phone number, it's some kind of ID, and I don't want to call that number. I can call user number (that is in title bar) like phone number only on android 4.0.4.
On iPhone 4 (iOS 6) and Android 4.1.2 this is not happaning i.e. I can call only the phone number.
Can somebody tell me what is the problem ? And how can I solve this issue ?

Ext.define("CallPhoneApp.view.Test", {
    extend: "Ext.form.Panel",
    requires: "Ext.form.FieldSet",
    alias: "widget.testview",
    config: {
        scrollable: "vertical",
        items: [
            {
                xtype: "toolbar",
                docked: "top",
                title: "<div>User No. 8344396856</div>"
            },
            { xtype: "fieldset",
                items: [
                    {
                        xtype: "label",
                        html: "First name"
                    },
                    {
                        xtype: "label",
                        html: "Last name"
                    },
                    {
                        xtype: "label",
                        html: "Home phone num. <a href='tel:{+38999888777}'>home</a>"
                    }
                ]
            }
        ]
    }
});
4

2 回答 2

4

尝试这个

<a href="#" name="tel:8344396856">8344396856</a>

你的听众会是这样的——

listeners :{
      element  : "element",
      delegate : "a",
      tap: function (e,eopts) {
          var link=e.target.name;
          window.location.href = link;
      }
    }
于 2013-08-13T13:38:33.447 回答
1

您不需要 sencha 来执行此操作,您可以使用<a>标签

User no <a href="tel:8344396856">8344396856 </a>

点击链接将自动在 android 中召唤手机应用程序。我已经在 2.3+ 设备和 iPhone 上对此进行了测试,并且对我有用。

希望能帮助到你

于 2013-07-31T08:24:13.717 回答