How can I get the buttons to link to a intent so when user clicks on one of these arrays it would load up a new java file?
final CharSequence[] items = {"Red", "Green", "Blue"};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Pick a color");
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
Toast.makeText(getApplicationContext(), items[item], Toast.LENGTH_SHORT).show();
}
});
AlertDialog alert = builder.create();
Add the new Intent related code in your onClick method?
So for example if you want your button click to start a new activity, put this in your onClick method: