1、创建Activity
2、配置Activity,
在AndroidManifest.xml文件中,配置Activity
<activity
android:name="DetailActivity"
android:label="详细内容"
android:icon="@drawable/ic_launcher"
></activity>
3、启动Activity
Intent intent = new Intent(MainActivity.this,DetailActivity.class);
// 启动活动
startActivity(intent);
4、关闭Activiy
button1.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});