【问题标题】:Appcelerator/Titanium Holo UI in case of modal: true is not workingAppcelerator/Titanium Holo UI 在模态的情况下:true 不起作用
【发布时间】:2013-10-23 12:06:10
【问题描述】:

我的用户界面有问题。

我通过 changin tiapp.xml 将默认 UI 更改为 Holo:

<android xmlns:android="http://schemas.android.com/apk/res/android">
<tool-api-level>14</tool-api-level>
<manifest>
    <application android:theme="@android:style/Theme.Holo">
        <activity android:name=".ThemetestActivity" android:theme="@android:style/Theme.Holo">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>
</android>

Holo UI 工作正常。但是如果我用道具模型打开新窗口:真的,新窗口会用旧用户界面打开,而不是全息。但如果 modal 为 false,它可以正常工作(但后退按钮不起作用。我使用 modal: ture,因为我需要后退按钮才能工作)。

这是我的代码:

var myButton = Titanium.UI.createButton({
   title: 'Test button',
   width: 500,
   height: 100,
   top: 60,
   font: { fontSize: 30 }
});

table.addEventListener('click', function(e) {
    var window = Ti.UI.createWindow({
        title:'Flight Details',
        backgroundColor:'#fff',
        backButtonTitle: 'Back',
        modal: true
    });

   window.add(myButton);
    window.open( { animated: true } );
});

为什么新窗口不在 Holo UI 中?

【问题讨论】:

    标签: android titanium appcelerator android-ui


    【解决方案1】:

    请查看 Titanium Q&A 开发网站上的答案:

    http://developer.appcelerator.com/question/158711/holo-ui-in-case-of-modal-true-is-not-working#answer-270378

    In tiapp.xml please add the following for applying holo theme on modal windows :
    <activity 
      android:name="org.appcelerator.titanium.TiModalActivity" 
       android:theme="@android:style/Theme.Holo" />
    

    【讨论】:

    • 我已经看到了。这也是我的问题 :) 我同时在论坛和这里发布了我的问题 :)
    猜你喜欢
    • 1970-01-01
    • 2012-02-02
    • 1970-01-01
    • 1970-01-01
    • 2016-05-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多