2017-08-25 24 views

回答

0

但我不知道如何編程在每次按下按鈕時在編輯文本中輸入幾個數字。

使用TextViewAppend方法,例如,找到你TextView的活動:

TextView tv = FindViewById<TextView>(Resource.Id.tv); 

然後在Button click事件中,ButtonText附加到這個tv,在這裏我追加隨機數每次點擊按鈕時:

Random r = new Random(); 
tv.Append(r.Next(9).ToString());