当我尝试构建应用程序时,我似乎遇到了语法错误。我试图从一个页面导航到另一个页面,但似乎有6个语法错误。我能不能帮助我找错了!
package com.techblogon.loginexample;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainMenu extends Activity {
protected void onCreate(Bundle setInstanceState) {
super.onCreate(setInstanceState);
setContentView(R.layout.activity_main_menu);
final Button button = (Button) findViewById(R.id.btnhealth);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent activityChangeIntent = new Intent(MainMenu.this, Tips.class);
MainMenu.this.startActivity(activityChangeIntent);
}
});
}
}