援助教技--IT點滴日誌
以為自己什麼都會,事實上是什麼都只會一點點的雜工罷了
2013年7月8日 星期一
EditText 類別setText遇到數字型態會出錯?
EditText 類別setText遇到數字型態會出錯?
嗯,因為....setText(int)指的是從resource的id找出string對應物件出來設定文字的
沒給你出現亂碼已經很客氣了
那如何定「數字」進去?
跟javascript一樣,在前面加個空字元就可以了,ex: editTxt.setText(""+number);
就是這麼簡單.
張貼者:John Cheng @
晚上7:01
0 個意見
0 個意見:
張貼留言
訂閱 張貼留言 [
Atom
]
<< 首頁
關於我自己
名稱:
John Cheng
檢視我的完整簡介
先前的文章
For Android: How to setup checked radio button in ...
SharedPreferences無法儲存!?
how to calculate the height of ListView ?
how to scroll to top after showing a long big Scro...
如何取得extjs4 容器物件中的items內容?
for extjs4 一個有關動態resize window案例
android : 確認google定位權限
如何從android client post中文到server去?
for android : 最小單位的TabHost & Tabspec 框架
for android:分頁式ListView絕佳範例
訂閱
文章 [
Atom
]
0 個意見:
張貼留言
訂閱 張貼留言 [Atom]
<< 首頁