Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Basic Intent Functionality
package com.example.aasemjs.intentbasic;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
public class MainActivity extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
public void buttonClick(View view) {
Intent i = new Intent(MainActivity.this, Main2Activity.class);
MainActivity.this.startActivity(i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.