titanium mobile : searchbar の高さがandroidでズレる。他

http://developer.appcelerator.com/question/129136/searchbar-cutoff-in-android

iosでは綺麗ですが、androidのsearch bar は不格好。。。
これスタイル調整重要ですね。
とりあえず高さが上にくっついているので
top: (isAndroid) ? 2: 0,
のように振り分ける形で良さそうです。

===

http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.SearchBar

androidで起動時にsearchbarにfocusがあるので、キーボードがでる。。。

searchbar.blur();

を起動時に呼び出すとかでは上手く動かない?
window生成時に

{ windowSoftInputMode:Ti.UI.Android.SOFT_INPUT_STATE_HIDDEN }

を入れると大丈夫でした。

===

search return 時に blurしないとfocusが取れない。
searchbar.addEventListener(‘return’,function(){ searchbar.blur(); } );
みたいな感じで外す。
* しかし、blurが効かない・・・のでdocsにあるようにhide and showをします。

searchBar.blur();
if( Ti.Platform.osname == ‘android’){
searchBar.value = ”;
searchBar.hide();
searchBar.show();
}

でもなんかイマイチなので諦めます。
テキストエリアの文字を消すというのが・・・

This entry was posted on 土曜日, 3月 30th, 2013 at 10:29 AM and is filed under Titanium. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。