三个点,Display-addSecondary display
方案一
通过Presentation来实现,他是一个Dialog(context,display)
val displayService = getSystemService(DISPLAY_SERVICE) as DisplayManager
val displays = displayService.displays
for (display in displays){
Log.i("alic",display.toString())
}
if (displays.size > 1){
Log.i("alic show",displays[1].toString())
var p:Presentation = DifferentDisplay(this, displays[1])
p.show()
}
package com.example.myapplication;
import android.app.Presentation;
import android.content.Context;
import android.os.Bundle;
import android.view.Display;
public class DifferentDisplay extends Presentation {
public DifferentDisplay(Context outerContext, Display display) {