Skip to content

Instantly share code, notes, and snippets.

@TheAlchemistKE
Created July 15, 2019 05:04
Show Gist options
  • Save TheAlchemistKE/e3707354346873718e9ccc2bfa5ecef9 to your computer and use it in GitHub Desktop.
Save TheAlchemistKE/e3707354346873718e9ccc2bfa5ecef9 to your computer and use it in GitHub Desktop.
package com.example.alc4phase1;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.Uri;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import java.security.PublicKey;
public class MainActivity extends AppCompatActivity {
private Button button, yourButton;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
yourButton = (Button) findViewById(R.id.button2);
button = (Button) findViewById(R.id.aboutButton);
//Goes to AboutALC.
button.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent profileIntent =
new Intent(MainActivity.this, AboutAlc.class);
startActivity(profileIntent);
}
});
//Goes to Profile.
yourButton.setOnClickListener(new View.OnClickListener(){
public void onClick(View v){
startActivity(new Intent(MainActivity.this, MyProfile.class));
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment