Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Soft keyboard not show up upon Android Search View gains focus

$
0
0

The code below generates this issue

var win = Ti.UI.createWindow({
    windowSoftInputMode :  Titanium.UI.Android.SOFT_INPUT_ADJUST_PAN
});
 
 
 
var search = Ti.UI.Android.createSearchView({
    hintText : "Table Search",
    softKeyboardOnFocus : Titanium.UI.Android.SOFT_KEYBOARD_SHOW_ON_FOCUS,
    iconifiedByDefault : false,
    top : 120
});
win.addEventListener("open", function() {
    win.activity.onCreateOptionsMenu = function(e) {
        e.menu.add({
            title : "Action View Search",
            icon : (Ti.Android.R.drawable.ic_menu_search ? Ti.Android.R.drawable.ic_menu_search : "my_search.png"),
            actionView : search,
            showAsAction : Ti.Android.SHOW_AS_ACTION_ALWAYS | Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW
        });
    };
    win.activity.invalidateOptionsMenu();
 
    search.focus();
});
 
win.open();
Any idea?

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>