0
我想設置圖形的表面視圖,但錯誤不斷顯示我必須導入SView時,我已經做了。我所嘗試的每件事似乎都行不通。以下代碼中缺少任何內容嗎?還是我忘了添加一些東西?表面視圖不工作
Firstclass.java:
package com.XXX.XXX;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import com.mtprogramming.blockfight.SView;
SView ourView;
public class Singleplayer extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
ourView = new SView(this);
setContentView(ourView);
}
}
SView:
package com.XXX.XXX;
public class SView extends SurfaceView implements Runnable{
public SView(Singleplayer singleplayer) {
// TODO Auto-generated constructor stub
}
public void run(){
}
}