Android: Open Up a New View From a Button Click

2/24/2014 8:50:47 PM

The following requires a button in the XML file and the OptionsActivity.

<!-- xml layout -->
<Button
	android:id="@+id/butOptions"               
	android:onClick="butOptions_onClick"
	android:text="@string/butOptions_Title" />

// butOptions
public void butOptions_onClick(View view)
{
	// Do something in response to button
	Intent intent = new Intent(this, OptionsActivity.class);

	startActivity(intent);
}