package com.example.administrator.missphoto; import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.view.View; import android.widget.Button; import android.widget.ImageButton; public class ZhuceActivity extends Activity { private ImageButton btn_back; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_zhuce); btn_back=(ImageButton)findViewById(R.id.btn_back); btn_back.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { Intent i=new Intent(); i.setClass(ZhuceActivity.this, MainActivity.class); startActivity(i); } }); } }