我有UI问题。
我使用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工作正常。但是,如果我用道具模型打开新窗口:ture,新窗口打开旧UI,而不是全息。但是如果模态为假,它工作正常(但后退按钮不起作用。我使用模态: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中?
答案 0 :(得分:2)
请查看Titanium Q&amp; A开发网站上的答案:
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" />