我如何在方法中调用单独的活动:
例如:
private void startApp() {
Patient_Button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
// I want this Button to go to an Detailed_ModeActivity
// This is how i Am doing it right now, but it comes out with an
// error
Intent b = new Intent(this, Detailed_ModeActivity.class);
startActivity(b);
}
});
}
任何帮助,将不胜感激。Button 在onCreate
方法中声明