EditText, Focus, Soft Keyboard...
How to close/hide the Android Soft Keyboard?Issue 2705: Setting requestFocus on EditText prevents soft keyboard from opening
Uhh...I've got some problems here.
But I gotta sleep now...
Sadly, tomorrow is MONDAY... Maybe I have to solve these problems next Saturday.
*Sigh*
Two more issues:
Issue 2771: Disabled EditText can still be edited using on-screen keyboard
Issue 3341: setFocusable() & setFocusableInTouchMode() don't work coreectly
So the solution's here:
Whe you wanna completely disable the soft-kb:
InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(editText.getWindowToken(), 0);
所謂的Hello World...
一般來說,寫程式第一個範例都是Hello World不過個人習慣加一點料...
Button button = (Button)findViewById(R.id.button);
button.setOnClickListener(buttonAction);
加個Button跟Listener...
private boolean flag = true;
private OnClickListener buttonAction = new OnClickListener(){
public void onClick(View v){
TextView text = (TextView)findViewById(R.id.text);
if (flag){
text.setText(R.string.hello2);
}
else {
text.setText(R.string.hello);
}
flag = !flag;
}
};
按Button則切換兩個String顯示.....
(string.xml)
<string name="hello">Stairway to heaven</string>
<string name="hello2">Highway to hell</string>
然後String一定要用這兩個 XDDDDDDDD
.......還真無聊Orz
Android 2.2 (Froyo)
Android 2.2 (Froyo) 正式發表- 速度大提升,Dalvik VM上增加JIT compiler,瀏覽器也增加Chrome的js引擎(感想是: Google裡真的是一堆神人........)
- Enterprise Support Enhanced
- App Data backup API & Cloud to Device Messaging API,App可以備份本身需要的資料....也可以經由Google的Server傳訊息到手機上
- USB Tethering & Wifi Hotspot sharing,就網路分享.......XD
- 語音搜尋、翻譯、播號等等,英文之後會先支援中、日文,有裝語音搜尋的人會發現Google翻譯裡的中翻英跟日翻英已經能用語音了...辨識度中上.....對我來說還比英文好,因為英文發音不標準XDDDD
- Flash 10.1 & AIR support (Steve Jobs表示:.......)
- 對一般User最重要的...APP2SD...! 另外market上有Auto-update跟Update-All可以選擇,並且可以在電腦上選app下載,也可以線上買專輯,然後串流到手機播放...
- 對開發人員比較重要的...bug Report System,另外也有新的互動式廣告(Just Like iAd)
- 新的SDK跟NDK也出了 (一般的個人Developer應該用不到NDK...沒那麼強Orz)
然後現場一人送一台EVO 4G....! (送一個月吃到飽約的樣子)
以後要記得,Google辦的活動說什麼都要去參加 XDDDDDDDDDD
一下子送N1一下子送EVO的.......
不過這次比較接近Sprint的陰謀XDDDD
EVO 4G加綁約應該是$199 加送一個月應該是$79.99
$280.....然後報名費據說是$400這樣 XD 而且之後也會有很多人跟Sprint續約...科科...
......但是能比人早兩個禮拜拿到就是爽 XD (也比人早當白老鼠.....XD)
訂閱:
文章
(
Atom
)
沒有留言 :
張貼留言