/*加载main.xml Layout,此时myTextView01:text为str_1*/ setContentView(R.layout.main); mTextView01 = (TextView) findViewById(R.id.myTextView01); String str_2 = "欢迎来到Android的TextView世界..."; mTextView01.setText(str_2);