我有 SurfaceView 和 Run() 方法,它就像一个循环,我如何在这个 Run 方法中编辑 textView 文本?我写 :
textView1.setText("my text");
它没有工作?有任何想法吗 ?代码摘要是:
public class GFXSurface extends Activity {
MySurface ourSurfaceView;
TextView textView1;
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(ourSurfaceView);
}
public class MySurface extends SurfaceView implements Runnable{
@Override
public void run() {
//here i want to edit textView1
}
}
}