it's a easy question, but I can't figure it out:
this is my xml :
<?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"
>
<GG.My_pic.testA
android:id = "@+id/myview"
android:layout_width = "fill_parent"
android:layout_height = "fill_parent"
/>
</FrameLayout>
In lunar lander, the main thread uses
// tell system to use the layout defined in our XML file
setContentView(R.layout.lunar_layout);
But I can't use my
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
If I change my R.layout.main to --> new testA(this) , it works
(testA is the class that extends SurfaceView implements SurfaceHolder.Callback)
why??