-2
我有this設計,但我不知道如何編程在每次按下按鈕時在編輯文本中輸入多個數字。有誰能夠幫助我?謝謝。如何用xamarin.android中的按鈕做鍵盤?
我有this設計,但我不知道如何編程在每次按下按鈕時在編輯文本中輸入多個數字。有誰能夠幫助我?謝謝。如何用xamarin.android中的按鈕做鍵盤?
但我不知道如何編程在每次按下按鈕時在編輯文本中輸入幾個數字。
使用TextView
的Append
方法,例如,找到你TextView
的活動:
TextView tv = FindViewById<TextView>(Resource.Id.tv);
然後在Button
click事件中,Button
的Text
附加到這個tv
,在這裏我追加隨機數每次點擊按鈕時:
Random r = new Random();
tv.Append(r.Next(9).ToString());