我一直在关注它,我被困在 3 个 textview 错误教程中:http: //developer.android.com/training/basics/firstapp/starting-activity.html 我收到 2 个错误,说 textView 无法解决,一个说 textView 不能解析为变量。帮助!
@SuppressLint("NewApi")
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// Get the message from the intent
Intent intent = getIntent();
String message = intent.getStringExtra(MainActivity.EXTRA_MESSAGE);
// Create the text view
TextView textview = new TextView(this);
textView.setTextSize(40);
textView.setText(message);
// Set the text view as the activity layout
setContentView(textView);
setContentView(R.layout.activity_display_message);
// Show the Up button in the action bar.
setupActionBar();
`