标签: splash-screen

启动画面不会将焦点返回到主窗体

我是大家.使用启动画面时,我目前的焦点有问题.我正在使用VS2008,带有.NET framework 2.0.此外,我已将我的项目与VisualBasic.dll链接,因为我使用ApplicationServices来管理我的单实例应用程序和启动画面.

这是一个简化了我尝试调试的代码片段.

namespace MyProject
{
    public class Bootstrap
    {
        /// <summary>
        /// Main entry point of the application. It creates a default 
        /// Configuration bean and then creates and show the MDI
        /// Container.
        /// </summary>
        [STAThread]
        static void Main(string[] args)
        {
            // Creates a new App that manages the Single Instance background work
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            App myApp = new App();
            myApp.Run(args);
        }
    }

    public class App : WindowsFormsApplicationBase
    {
        public App()
            : base()
        {
            // Make this …
Run Code Online (Sandbox Code Playgroud)

c# focus splash-screen

8
推荐指数
1
解决办法
5392
查看次数

如何在Phonegap 3.3中显示Splashscreen

如何正确显示防溅板?我正在使用CLi本地版本,我听说它是​​兼容的.我添加了插件:phonegap插件添加org.apache.cordova.splashscreen这是我的配置文件:

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.Snap.What" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
    <name>WhatSnap</name>
    <description>
        Hello World sample application that responds to the deviceready event.
    </description>
    <author email="support@phonegap.com" href="http://phonegap.com">
        PhoneGap Team
    </author>
    <feature name="http://api.phonegap.com/1.0/device" />
    <preference name="permissions" value="none" />
    <preference name="orientation" value="default" />
    <preference name="target-device" value="universal" />
    <preference name="fullscreen" value="true" />
    <preference name="webviewbounce" value="true" />
    <preference name="prerendered-icon" value="true" />
    <preference name="stay-in-webview" value="false" />
    <preference name="ios-statusbarstyle" value="black-opaque" />
    <preference name="detect-data-types" value="true" />
    <preference name="exit-on-suspend" value="false" />
    <preference name="show-splash-screen-spinner" value="true" />
    <preference name="auto-hide-splash-screen" value="true" />
    <preference …
Run Code Online (Sandbox Code Playgroud)

splash-screen phonegap-plugins cordova cordova-3

8
推荐指数
1
解决办法
8961
查看次数

有没有办法根据 Apps 主题更改初始屏幕颜色?

能否以编程方式更改原生 android 启动画面颜色,以便可以将其设置为适合为 Flutter 应用程序选择的主题?

有点像当系统主题设置为深色时 WhatsApp 启动画面在深色主题中的加载方式。

深色和浅色 WhatsApp 启动画面:

深色和浅色 WhatsApp 启动画面

我猜这使用两个主题作为启动画面,它们链接到系统主题,但我不太了解如何以及是否可能。

所以问题是:是否可以在运行 flutter 应用程序时更改启动画面的颜色/主题,以便在应用程序的下一次启动时,原生 android 启动画面以与 Flutter 应用程序相同的主题加载?

(对不起,如果我重复了很多,但我想尽可能好地描述我的要求)

android themes splash-screen flutter

8
推荐指数
1
解决办法
2372
查看次数

离子和电容器 - Android 启动画面响应能力

语境

这与闪屏图像响应能力有关,根据我的研究,这只是因为Capacitor Docs - Splash Screen 中缺少文档。

问题

问题是在实现电容的闪屏插件时开始的。通常,当您创建整个项目时,此实现是从头开始的。然而,它没有/没有对具有设备工作良好拉伸纵横比(例如谷歌像素2 XL)或具有设备脂肪纵横比(例如iPad的专业版)。甚至在某些情况下,启动画面图像会四处移动或缩小/扩展(加载时)。

视觉说明

换句话说,本机实现导致启动画面图像就像下图一样。如果设备被拉伸或变胖,则不会保留图像纵横比。

在此处输入图片说明

android splash-screen ionic-framework angular capacitor

8
推荐指数
1
解决办法
1312
查看次数

如何在React Native for Android中的启动画面后删除白色屏幕

我有一个Default react本机项目,我安装了From This Turorial,我刚刚使用本教程将Splash Screen添加到我的项目中,但我得到了第一个:

  • 0.5下降闪屏照片
  • 然后1.5分白屏
  • 然后,我的应用程序启动,

解决此问题的最佳和最常用的方法是什么? 我需要只有1个标准预加载启动屏幕和该应用程序启动之后,我阅读更多文章,但我不能通过本机反应修复.

<application
  android:name=".MainApplication"
  android:allowBackup="true"
  android:label="@string/app_name"
  android:icon="@mipmap/ic_launcher"
  android:theme="@style/AppTheme">
  <activity
    android:name=".SplashActivity"
    android:label="@string/app_name"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:windowSoftInputMode="adjustResize"
    android:theme="@style/SplashTheme">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
  </activity>
  <activity android:name=".MainActivity" />
  <activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
Run Code Online (Sandbox Code Playgroud)

splash-screen react-native

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

利用 Android 导航组件处理带有闪屏活动的深层链接

我有一个包含两个活动的应用程序,一个启动屏幕活动和另一个包含应用程序主导航图的应用程序。

我想利用 Android 导航组件附带的新深度链接处理。然而,按照谷歌教程,点击链接时会跳过启动画面,直接进入应用程序的导航图。

有什么方法可以使用这些新功能,同时在导航到应用程序的正确部分之前仍然强制首先显示启动画面?

navigation android components splash-screen deep-linking

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

如何在颤振中创建自定义动画启动屏幕

我想用最少的动画(如旋转图像)创建一个启动屏幕。从此处找到的文档中我认为可以使用“创建自定义 SplashScreen”部分中提到的方法来这样做。但我不知道从哪里开始。我首先使用创建了一个颤振 java 项目

 flutter create -a java custom_splash
Run Code Online (Sandbox Code Playgroud)

然后我尝试复制粘贴文件内文档链接中给出的代码MainActivity.java并运行该应用程序,但该应用程序根本无法构建。我也尝试在内部使用旋转可绘制对象,launch_background.xml尽管它确实将图像旋转到特定角度,但它是静态的而不是动画的。

注意:我没有构建任何原生 android 应用程序,java 对我来说也是新的

编辑 1: 我想我必须将它显示为视图而不是可绘制对象。所以我尝试了这个。创建了一个名为SplashScreenWithTransition.javanext的文件MainActivity.java

package com.example.native_splash;

import android.content.Context;
import android.os.Bundle;
import android.view.View;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.example.native_splash.mySplashView;

import io.flutter.embedding.android.SplashScreen;

public class SplashScreenWithTransition implements SplashScreen {
    @Override
    @Nullable
    public View createSplashView(
            @NonNull Context context,
            @Nullable Bundle savedInstanceState
    ) {
        return new mySplashView(context);
    }

    @Override
    public void transitionToFlutter(@NonNull Runnable onTransitionComplete) {
        onTransitionComplete.run();
    }
}
Run Code Online (Sandbox Code Playgroud)

和另一个名为 mySplashView.java …

animation android splash-screen dart flutter

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

加载前启动屏幕白色闪烁(React Native Expo)

当应用程序加载时,有一个白色背景,然后在显示启动画面之前闪烁。我已经从 app.json 文件中删除了启动画面,因为我正在手动加载和隐藏启动画面。(将启动画面留在 app.json 文件中会导致显示启动画面,然后出现白色闪烁,然后再次显示启动画面)

应用程序.js

import React from 'react';
import { StyleSheet, View, Image } from 'react-native'
import { MyAuthStack, MyMainDrawer } from './Screens/Navigators'
import firebase from './firebase'
import { AppLoading, SplashScreen } from 'expo';
import { Asset } from 'expo-asset';

export default class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      authState: false,
      imgUrl: '',
      isSplashReady: false,
      isAppReady: false,
    }

  }
  _cacheSplashResourcesAsync = async () => {
    const gif = require('./assets/splash.png');
    return Asset.fromModule(gif).downloadAsync();
  }

  _cacheResourcesAsync = …
Run Code Online (Sandbox Code Playgroud)

splash-screen flicker react-native expo

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

Ionic + Capacitor 3 + Android 短暂显示扭曲的飞溅图像

如果您使用@capacitor/splash-screen API 在带有 Capacitor 3 的 Ionic Android 应用程序中显示启动画面,您可能会遇到以下问题:

问题

在几分之一秒内,飞溅图像将扭曲显示,直到以正确的纵横比显示。这意味着它也会在屏幕上“跳跃”一点,如果您在设备处于横向时启动应用程序,或者您的设备已拉伸或显示宽高比,这将特别明显。

背景信息

发生这种情况是因为AppTheme.NoActionBarLaunch在应用程序启动时使用它MainActivity被设置为将启动图像作为背景图像,但“真实”启动图像在几毫秒后在SplasScreen.buildViews()插件的方法中被初始化。

解决方案

要修复它,您可以在您的styles.xml文件中更改以下内容/android/app/src/main/values

老的:

    <style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
        <item name="android:background">@drawable/splash</item>
    </style>
Run Code Online (Sandbox Code Playgroud)

新(无背景):

    <style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
        <item name="android:background">@null</item>
    </style>
Run Code Online (Sandbox Code Playgroud)

或者设置启动画面的背景颜色:

    <style name="AppTheme.NoActionBarLaunch" parent="AppTheme.NoActionBar">
        <item name="android:background">#ffffff</item>
    </style>
Run Code Online (Sandbox Code Playgroud)

这将防止在将实际 ImageView 添加到视图层次结构之前将启动图像显示为背景图像。ImageView 将具有androidScaleType插件配置中定义的正确 scaleType 。

使用以下版本进行测试:

  • @电容器/机器人:3.0.0-rc.0
  • @电容器/闪屏:0.3.6
  • @离子/角度:5.6.3

使用以下配置:

const config: CapacitorConfig = {
    // ...
    plugins: {
        SplashScreen: {
            launchShowDuration: 3000,
            launchAutoHide: …
Run Code Online (Sandbox Code Playgroud)

android splash-screen ionic-framework capacitor

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

Android 12 API 31 初始屏幕 NullPointerException:尝试调用虚拟方法 'boolean android.graphics.drawable.Drawable.isProjected()

我正在按照文章 https://developer.android.com/about/versions/12/splash-screen-migration在 Android 12 上实现 Splash Screen API

我使 Splash Screen API 正常工作,但在 Android 8 和 9 上崩溃并重新启动 Android 系统。

这是代码和日志:

清单.xml

<application
    android:name=".App"
    android:allowBackup="false"
    android:label="@string/app_name"
    android:icon="@mipmap/ic_launcher"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:theme="@style/AppTheme">

    <activity
        android:name=".ui.SplashActivity"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme.Splash"
        android:clearTaskOnLaunch="true"
        android:exported="true">

        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>

    </activity>

    <activity
       android:name=".ui.MainActivity"/>

</application>
Run Code Online (Sandbox Code Playgroud)

样式.xml

<style name="AppTheme" parent="Theme.MaterialComponents.Light.NoActionBar">
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryVariant">@color/colorPrimaryVariant</item>
    <item name="colorOnPrimary">@color/white</item>
    <item name="colorSecondary">@color/colorSecondary</item>
    <item name="colorOnSecondary">@color/white</item>
    <item name="colorSurface">@color/white</item>
    <item name="colorError">@color/colorError</item>

    <item name="android:statusBarColor">@color/colorBackground</item>
    <item name="android:navigationBarColor">@color/colorBackground</item>
    <item name="android:windowLightStatusBar" tools:ignore="NewApi">true</item>
    <item name="android:windowLightNavigationBar" tools:ignore="NewApi">true</item>

    <item name="android:windowBackground">@color/colorBackground</item>
</style>

<style name="AppTheme.Splash" …
Run Code Online (Sandbox Code Playgroud)

android splash-screen

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