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:
@@ -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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user