I have the following code where MyClass basically extends View. I was wondering if I need to use both setContentView(R.layout.activity_mainlcass_app)
and setContentView(myDrawing)
to show the 2D graphics that I draw in MyClass.
public class MainClass extends Activity {
MyClass myDrawing;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_mainlcass_app);
myDrawing = new myDrawing(this);
setContentView(myDrawing);
myDrawing.requestFocus();
}
}