You are on page 1of 1

Activity

Start an activity (secondActivity) with Data transfer


#xml
//Create a separate layout for that activity.
#import android.content.Intent;
#onCreate/Anywhere
Intent activityIntent =new Intent(this, secondActivity.class);
Bundle newActivityInfo = new Bundle();
//newActivityInfo.putBlah();
//putDouble, putString, etc. key/value pairs.
activityIntent.putExtras(newActivityInfo);
startActivity(activityIntent);
#Manifest
<activity android:name=".secondActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
#end

You might also like