Sample for launching activity to the side.

Also includes changing the name of the sample from caption overlay to
general multi window sample directory.

Bug: 26141281
Change-Id: I8dca42c4af14b13cf874f0ac1ee6c5fad23aeceb
This commit is contained in:
Filip Gruszczynski
2015-12-14 15:02:43 -08:00
parent 4bb0b01550
commit 33600c9a4e
9 changed files with 157 additions and 6 deletions

View File

@@ -0,0 +1,22 @@
package com.example.android.multiwindow;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
public class MoveTaskToSideActivity extends Activity implements View.OnClickListener {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.move_task_to_side_layout);
findViewById(R.id.button).setOnClickListener(this);
}
@Override
public void onClick(View v) {
Intent intent = new Intent(this, LaunchingToSideActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_LAUNCH_TO_SIDE);
startActivity(intent);
}
}