标签: fullscreen

有没有办法检查另一个程序是否全屏运行

就像问题所说的那样.我可以看看其他人,程序是否全屏运行?

全屏意味着整个屏幕被遮挡,可能以与桌面不同的视频模式运行.

c# fullscreen

7
推荐指数
2
解决办法
4704
查看次数

全屏窗口不会使用KeyListener或KeyBoardFocusManager获取键盘输入

我在使用KeyBoardFocusManger全屏工作时遇到了问题Window.无论如何,它都不会得到键盘输入.我使用a System.exit(0)和a println()来查找对keypressed/release/typed方法的任何调用,但不会抛出任何错误.我试过了KeyListeners; 但我看了以后这个,我改变了一个KeyboardFocusManager,同样的事情仍然发生.我真的很绝望; 从我可以判断,Window是不是得到了键盘的焦点?

这是我的主要内容:

public static void main(String[] args) {
    EventQueue.invokeLater(new Runnable() {

        @Override
        public void run() {
            // Determine if full-screen mode is supported directly
            GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
            GraphicsDevice gs = ge.getDefaultScreenDevice();
            if (gs.isFullScreenSupported()) {
                Frame frame = new Frame(gs.getDefaultConfiguration());
                SpaceInvaderUI spaceInvaderUI = new SpaceInvaderUI(frame);
                // Enter full-screen mode
                gs.setFullScreenWindow(spaceInvaderUI);
            } else {
                JOptionPane.showMessageDialog(null, "Does not support full screen!", "Error 0x01", JOptionPane.ERROR_MESSAGE); …
Run Code Online (Sandbox Code Playgroud)

java swing fullscreen keylistener key-bindings

7
推荐指数
1
解决办法
2270
查看次数

是否可以使用html5自动全屏?

我基于在Web浏览器中使用Fullscreen API(http://hacks.mozilla.org/2012/01/using-the-fullscreen-api-in-web-browsers)进行全屏,但仅适用于单击事件或控制台firebug,而不是提交事件或鼠标悬停或类似的自动化.是否可以使用html5自动全屏而不点击事件或类似?

编辑:如果不可能,我理解安全性和可访问性的原因,但在某些环境中,这可能是有希望的.

javascript jquery html5 fullscreen

7
推荐指数
1
解决办法
7481
查看次数

JavaFx 2.2和全屏模式

美好的一天!

我尝试了我的第一个应用程序JavaFx.我设置了全屏模式并按下按钮显示一个对话框.当对话框出现时,主窗口将失去其全屏.

码:

public class Test1 extends Application {

    @Override
    public void start(final Stage primaryStage) {
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {
            @Override
            public void handle(ActionEvent event) {
                Stage dialogStage = new Stage(StageStyle.UTILITY);
                dialogStage.initModality(Modality.APPLICATION_MODAL);
                dialogStage.setScene(new Scene(VBoxBuilder.create().
                    children(new Text("Hi"), new Button("Ok.")).
                    alignment(Pos.CENTER).padding(new Insets(5)).build()));
                dialogStage.show();

                System.out.println(dialogStage.getOwner()==primaryStage.getOwner());
            }
        });

        StackPane root = new StackPane();
        root.getChildren().add(btn);

        Rectangle2D r = Screen.getPrimary().getBounds();
        Scene scene = new Scene(root, r.getWidth(), r.getHeight());

        primaryStage.setTitle("Hello World!");
        primaryStage.setScene(scene);
        primaryStage.setFullScreen(true);
        primaryStage.show();
    }

    public static void main(String[] args) { …
Run Code Online (Sandbox Code Playgroud)

fullscreen javafx-2

7
推荐指数
1
解决办法
7391
查看次数

UICollectionView全屏放大UICollectionViewCell

如何放大UICollectionViewCell以便全屏显示?我已经扩展UICollectionViewFlowLayout并在我的视图控制器中,当一个单元被轻敲时我正在这样做:

CGPoint pointInCollectionView = [gesture locationInView:self.collectionView];
NSIndexPath *selectedIndexPath = [self.collectionView indexPathForItemAtPoint:pointInCollectionView];
UICollectionViewCell *selectedCell = [self.collectionView cellForItemAtIndexPath:selectedIndexPath];

NSLog(@"Selected cell %@", selectedIndexPath);
Run Code Online (Sandbox Code Playgroud)

不确定从哪里开始.应该UICollectionView负责显示放大的细胞吗?或者我应该创建一个新的视图控制器,以全屏显示单元格(图像)的内容?

zoom objective-c fullscreen ios uicollectionview

7
推荐指数
1
解决办法
7747
查看次数

Internet Explorer 11无法通过Fullscreen API进入全屏模式

我正在尝试使用全屏api.API可以正常运行所有其他浏览器,但不幸的是ie11没有响应.我正在使用此处复制的代码:

var element = $doc.documentElement;
var requestMethod = element.requestFullScreen || element.webkitRequestFullScreen || element.mozRequestFullScreen || element.msRequestFullscreen;

    if (requestMethod) 
    { // Native full screen.
        console.log(requestMethod);
        requestMethod.call(element);
    } 
    else if (requestMethod !== "undefined") 
    { // Older IE.
        console.log("window.ActiveXObject !== undefined");
        var wscript = new ActiveXObject("Wscript.shell");
        wscript.SendKeys("{F11}"); 
    }
Run Code Online (Sandbox Code Playgroud)

有什么建议?

javascript internet-explorer fullscreen

7
推荐指数
1
解决办法
2222
查看次数

Facebook yoga/react-native flexbox css-layout位置:"固定"支持

为了支持位置:css-layout中的"fixed"(react-native),

使用案例:我有(很多)视频深度嵌套在视图层次结构中 - 想想视频列表,其中任何一个我想全屏.

当前方法(hack):使视频视图与屏幕一样大(css样式中高度宽度的固定值),跟踪视频视图的父布局位置,并为视频提供负边距以正确显示.

期望的方法:想知道是否有一种简单的方法可以做到这一点(如位置:固定)

欢迎任何建议或帮助

css layout fullscreen react-native

7
推荐指数
0
解决办法
1020
查看次数

在渐进式Web应用程序中隐藏地址栏

我正在使用VueJS开发PWA。我开始在真实设备(添加到主屏幕)中测试我的应用程序。我的应用程序打算达到100%的高度,因为它显示了一张地图,如您所见:

在此处输入图片说明

似乎有时,从视口高度外部出现的过渡会使地址栏出现在页面顶部。对于PWA,我认为这种行为使应用程序看起来不太自然,并且破坏了我的设计(除非用户手动关闭地址栏,否则不显示底部中心的按钮和整个地图容器)。

在此处输入图片说明

我尝试了在其他问题中看到的一些事情:

  • window.scrollTo(0, 1);
  • <meta name="mobile-web-app-capable" content="yes">
  • 这里

我不在乎该应用程序在网络浏览器中访问时是否不隐藏地址栏。但是至少当我将应用程序作为“本机”应用程序启动时(添加到主屏幕),我希望地址栏隐藏。

我也尝试改变display在物业manifest.jsonstandalonefullscreen没有运气。

我知道我可以更改按钮和地图的css以便在地址栏可见时使它们“可见”,但是正如我说的那样,这使该应用程序不太像IMO。

有没有永久隐藏地址栏的解决方案?在设计中是否有可能或必须考虑?

fullscreen progressive-web-apps manifest.json

7
推荐指数
4
解决办法
3520
查看次数

C#在游戏应用程序中按住键

我正在尝试创建一个C#应用程序,它将控制游戏.我试图做的是例如:按住A键150ms,按住左箭头500ms,依此类推.我经常搜索,我发现了以下代码.我的程序首先瞄准游戏,然后拿着钥匙.

I'm holding the keys this way:

Keyboard.HoldKey(Keys.Left);
Thread.sleep(500);
Keyboard.ReleaseKey(Keys.Left);
Run Code Online (Sandbox Code Playgroud)

这是Keyboard类:

public class Keyboard
 {
    public Keyboard()
    {
    }

    [StructLayout(LayoutKind.Explicit, Size = 28)]
    public struct Input
    {
        [FieldOffset(0)]
        public uint type;
        [FieldOffset(4)]
        public KeyboardInput ki;
    }

    public struct KeyboardInput
    {
        public ushort wVk;
        public ushort wScan;
        public uint dwFlags;
        public long time;
        public uint dwExtraInfo;
    }

    const int KEYEVENTF_KEYUP = 0x0002;
    const int INPUT_KEYBOARD = 1;

    [DllImport("user32.dll")]
    public static extern int SendInput(uint cInputs, ref Input inputs, int cbSize);

    [DllImport("user32.dll")]
    static …
Run Code Online (Sandbox Code Playgroud)

c# key fullscreen keyup

6
推荐指数
1
解决办法
7352
查看次数

当设备使用 PIN/密码锁定时,全屏意图活动不会显示在外观屏幕上

我想在用户锁定设备后立即在 Android 外观屏幕上显示一份简短的调查问卷。为此,我检测屏幕锁定事件并显示带有全屏意图通知的活动。

 val fullScreenIntent = Intent(context, destination)
        fullScreenIntent.flags = Intent.FLAG_ACTIVITY_NO_HISTORY or
            Intent.FLAG_ACTIVITY_CLEAR_TASK or
            Intent.FLAG_ACTIVITY_CLEAR_TOP or
            Intent.FLAG_ACTIVITY_NEW_TASK

        val fullScreenPendingIntent = PendingIntent.getActivity(context, 0, fullScreenIntent, PendingIntent.FLAG_IMMUTABLE or PendingIntent.FLAG_UPDATE_CURRENT)

        val builder = NotificationCompat.Builder(context, CHANNEL_ID)
            .setSmallIcon(R.drawable.ic_logo)
            .setContentTitle(title)
            .setContentText(description)
            .setFullScreenIntent(fullScreenPendingIntent, true)
            .setPriority(NotificationCompat.PRIORITY_HIGH)
            .setCategory(NotificationCompat.CATEGORY_ALARM)

        with(notificationManager){
            createNotificationChannel()
            val notification = builder.build()
            notify(NOTIFICATION_ID, notification)
        }
Run Code Online (Sandbox Code Playgroud)

为了让活动显示在外观屏幕上,我在OnCreate调查问卷活动的方法中执行此操作:

fun Activity.turnScreenOnAndKeyguardOff() {
    setShowWhenLocked(true)
    setTurnScreenOn(true)

    with(getSystemService(Context.KEYGUARD_SERVICE) as KeyguardManager) {
        requestDismissKeyguard(this@turnScreenOnAndKeyguardOff, null)
    }
}
Run Code Online (Sandbox Code Playgroud)

在清单中:

 <activity
        android:name="com.example.trackingapp.activity.LockActivity"
        android:exported="true"
        android:launchMode="singleTop"
        android:showOnLockScreen="true"
        android:excludeFromRecents="true"/>
Run Code Online (Sandbox Code Playgroud)

这适用于 Android 9、10 和 11 以及某些 Android 12 (Pixel 3) …

android fullscreen lockscreen android-notifications keyguard

6
推荐指数
0
解决办法
1304
查看次数