Hi there,
I would if anyone can help.. I am coming from a c# background so i have the syntax basics of java and i following the hello world tutorial which has 1 activity (inherits from Activity) which basically shows my view like so
setContentView(R.layout.main);
So what i wanted to do (by viewing a tutorial) is create a menu by implementing (override) this method
onCreateOptionsMenu
but my activity class inherits Activity and it seems that this is not available in the superclass..
I am a little confused, can i create more than 1 Activity class? hence should i create a Menus Activity class that inherits from a different superclass?
If this is the case how would i call the new activity class i have created from my
public void onCreate
which is implemented on my main activity class that inherits Activity.
I am a little confused and i can't seem to find any concrete info with regards to this.
Any ideas?
Here is my simple activity class (its basically shows the view)
public class DGAdmin extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
//TextView tv = new TextView(this);
//tv.setText("Hello, Android");
//setContentView(tv);
}
}