I have a custom SurfaceView that looks like this:
public class GFXSurface extends Activity implements OnTouchListener
{
.
.
GameSurface gameSurfaceView;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.game);
gameSurfaceView = (GameSurface)findViewById(R.id.svgame);
fullscreen();
initialize();
}
.
.
.
public class GameSurface extends SurfaceView implements Runnable
{
.
.
public GameSurface(Context context)
{
super(context);
ourHolder = getHolder();
}
.
.
.
}
}
my question is how can I reference it in my xml layout?
i am using the xml layout cause i need to add some things on top of that surface view
and i tries several ways but all failed...
this doesnt work :
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" >
<com.bla.bla.GFXSurface.GameSurface
android:id="@+id/svgame"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
.
.
.
</FrameLayout>
thank you very much for the help!!!!