Titanium Desktop - 获取菜单栏图标位置
我正在尝试创建一个应用程序,其中仅在单击菜单栏图标时才显示主窗口。我已经创建了菜单栏图标,但我不知道如何将窗口放置在其下方。有没有办法获得它的x位置?
这是我的菜单栏图标的 javascript:
var win = Titanium.UI.getCurrentWindow();
var tray = Titanium.UI.addTray(
"app://images/menubar.png",
function(){ win.show(); }
);
单击菜单栏图标时显示窗口,但它显示在屏幕中央。
I am trying to create an app where the main window is shown only when the menubar icon is clicked. I have create the menubar icon but I can't figure out how to position the window underneath it. Is there a way to get the its x position?
This is my javascript for the menubar icon:
var win = Titanium.UI.getCurrentWindow();
var tray = Titanium.UI.addTray(
"app://images/menubar.png",
function(){ win.show(); }
);
This shows the window when the menubar icon is clicked, but it shows up in the center of the screen.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论