【问题标题】:Android Orientation in Titanium Alloy钛合金中的安卓定位
【发布时间】:2014-11-05 12:23:42
【问题描述】:

我希望我的应用在 Android 中同时允许纵向和横向模式,但我发现的大多数选项似乎都不起作用,或者我可能没有正确实现它们。

我尝试设置此示例中的代码,但没有成功:

http://docs.appcelerator.com/titanium/3.0/#!/guide/Orientation

这是我的 tiapp.xml 中的 Android 清单代码

<android xmlns:android="http://schemas.android.com/apk/res/android">
    <manifest>
        <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="18"/>         
        <!-- This removes the action ot title bar in Android. -->
        <application android:theme="@style/Theme.Titanium"/>
    </manifest>
</android>

【问题讨论】:

  • 我的 tiapp 中的 uses-permission 节点为零,纵向和横向从一开始就正常运行。可能会检查您的设备
  • 我认为权限是应用商店让用户知道应用可以访问的内容。是否需要将一些代码添加到清单中以使其旋转全传感器。

标签: javascript android titanium-mobile titanium-alloy


【解决方案1】:

这是我的 tiapp.xml 文件关于 android 配置和只会显示状态栏的窗口:

<android xmlns:android="http://schemas.android.com/apk/res/android">
  <manifest>
    <application android:icon="@drawable/appicon" android:label="Test" android:name="TestApplication" android:debuggable="false" android:theme="@style/Theme.AppCompat.Translucent.NoTitleBar">
    </application>
  </manifest>
</android>

【讨论】:

  • 我会试试这个。谢谢
猜你喜欢
  • 1970-01-01
  • 2014-04-15
  • 2023-03-14
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多