AppCelerator-防止Android键盘在单击TableView行时出现
我正在用Appcelerator Alloy构建一个应用程序,但我不知道如何防止在单击TableView行时出现Android键盘,或者可能是在生成的AppCelerator-防止Android键盘在单击TableView行时出现,android,appcelerator,appcelerator-mobile,titanium-alloy,Android,Appcelerator,Appcelerator Mobile,Titanium Alloy,我正在用Appcelerator Alloy构建一个应用程序,但我不知道如何防止在单击TableView行时出现Android键盘,或者可能是在生成的$.myWindow.open()事件触发时出现Android键盘 以下是我的Alloy XML: <Alloy> <TabGroup title="Testing"> <Tab title="News"> <Window id="newsWindow" class="contain
$.myWindow.open()
事件触发时出现Android键盘
以下是我的Alloy XML:
<Alloy>
<TabGroup title="Testing">
<Tab title="News">
<Window id="newsWindow" class="container" title="News">
<TableView id="tableView"/>
</Window>
</Tab>
<Tab title="Photos">
<Window class="container" title="Photos">
<Label>Testing</Label>
</Window>
</Tab>
</TabGroup>
这可能是您正在寻找的(在api文档中) 试试这个 如果(OS_Android) Ti.UI.Android.hideSoftKeyboard()
<Alloy>
<TableViewRow id="rowView">
<ImageView id="image"/>
<View id="postView" layout="vertical">
<Label id="articleLabel"/>
<Label id="articleDetails"/>
</View>
</TableViewRow>
$.tableView.addEventListener('click',function(e){
var postView = Alloy.createController('postView', e.row.args).getView();
if (OS_IOS)
{ $.navGroupWin.openWindow(postView); }
if (OS_ANDROID)
{
postView.open();
}
});
softKeyboardOnFocus : Number
Determines keyboard behavior when this view is focused.
One of Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, Titanium.UI.Android.SOFT_KEYBOARD_HIDE_ON_FOCUS, or Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS.
Default: Titanium.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS