androidstudio activity页面跳转




    

    

mainactivity

import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
private Button button;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        this.button = (Button) this.findViewById(R.id.button);
        this.button.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent();
                intent.setClass(MainActivity.this, NextActivity.class);
                startActivity(intent);
            }
        });
    }


你可能感兴趣的:(js与前端)