Android 台灣中文網
標題:
ImageView 問題
[打印本頁]
作者:
ArthasL
時間:
2013-10-7 20:59
標題:
ImageView 問題
我在 public void startgame() 內加了 final ImageView dropball = new ImageView(this);
如何在
public boolean onTouchEvent(MotionEvent event) 內用回dropball這個 ImageView ?
2個都是直接在跟Activity內的
作者:
ploglin
時間:
2013-10-8 18:00
你可以在最後面定義
private ImageView dropball;
複製代碼
在 startgame() 中再 init
dropball = new ImageView(this);
複製代碼
這樣應該在 onTouchEvent 時就可以使用了
作者:
ArthasL
時間:
2013-10-8 19:18
本帖最後由 ArthasL 於 2013-10-8 22:34 編輯
ploglin 發表於 2013-10-8 18:00
登錄/註冊後可看大圖
你可以在最後面定義在 startgame() 中再 init這樣應該在 onTouchEvent 時就可以使用了 ...
error沒有了
已測試 成功了 THX
歡迎光臨 Android 台灣中文網 (https://apk.tw/)
Powered by Discuz! X3.1