我正在编写单击按钮后转到下一页的代码,所以我编写了下面提到的代码我只是想确认它是正确的,因为我现在无法检查它,我知道这很愚蠢但我需要帮助
package com.example.myfirstapp;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
public class DetailsActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_details);
Button btnNextScreen = (Button) findViewById(R.id.btnNextScreen);
btnNextScreen.setOnClickListener(new View.OnClickListener() {
public void onClick(View view) {
Intent nextScreen = new Intent(getApplicationContext(), JewelInfo.class);
// TODO Auto-generated method stub
startActivity(nextScreen);
}
});
}
}