【问题标题】:How to set a fixed size for a Tide Sdk app window?如何为 Tide Sdk 应用程序窗口设置固定大小?
【发布时间】:2013-12-01 23:22:22
【问题描述】:

我正在尝试编译一个具有固定窗口大小且无法缩放的应用程序。我在 API 中找到了这些函数,但编译时它们似乎不起作用 -

var window = Ti.UI.currentWindow;
window.setHeight(500); // Set the window height to 800 pixels.
window.height = 500; // The same.
window.setMaxHeight(500);

【问题讨论】:

    标签: javascript window scale fixed tidesdk


    【解决方案1】:

    您可以通过编辑 tiapp.xml 来解决这个问题,其中 maxs 和 mins 关闭宽度和高度。您还可以定义应用不最大化或调整大小:

    <width>700</width>
    <max-width>700</max-width>
    <min-width>700</min-width>
    
    <height>500</height>
    <max-height>500</max-height>
    <min-height>500</min-height>
    
    <fullscreen>false</fullscreen>
    <resizable>false</resizable>
    <maximizable>false</maximizable>
    <minimizable>true</minimizable>
    

    http://tidesdk.multipart.net/docs/user-dev/generated/#!/guide/getting_started:

    【讨论】:

      猜你喜欢
      • 2016-07-04
      • 1970-01-01
      • 2013-12-16
      • 2015-03-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-09-06
      • 2023-03-11
      相关资源
      最近更新 更多