XML file:
<Button
android:id="@+id/btn"
android:onClick="launchSettings"
android:text="button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
java file:
public void launchSettings(View v){
//Launch a new activity
Intent i = new Intent(this,SettingActivity.class);
startActivity(i);
}
After adding these functionality you will be able to launch new Activity.
Top comments (0)