Switching two activities
I am new to Android apps development. I have a question on switching two
activities. I followed a youtube for switching two activities:
http://www.youtube.com/watch?v=0wz0bM-xy3M
But when I enter those code as shown in the bottom for my next class
NextActivity.java,
I noticed that I have three mistakes.......
protected void onCreate(Bundle savedInstanceState) - The method
onCreate(Bundle) of type NextActivity must override or implement a
supertype method
super.onCreate(savedInstanceState)-The method onCreate() in the type
Application is not applicable for the arguments (Bundle)
setContentView(R.layout.next) - The method setContentView(int) is
undefined for the type NextActivity
What's mistakes do I make? Thanks a lot!
package gorilla3d.activitytutorial;
import android.app.Application;
import android.os.Bundle;
public class NextActivity extends Application {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.next);
}
}
No comments:
Post a Comment