Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/EmptyTag/157.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 启动屏幕:在左上角显示奇怪的图像_Java_Android_Xml_Splash Screen - Fatal编程技术网

Java 启动屏幕:在左上角显示奇怪的图像

Java 启动屏幕:在左上角显示奇怪的图像,java,android,xml,splash-screen,Java,Android,Xml,Splash Screen,//喷溅活动 onCreate setContentView(R.layout.activity_splash); startActivity(new Intent(SplashActivity.this, HomeActivity.class)); //activity_splash.xml <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_wi

//喷溅活动

onCreate
setContentView(R.layout.activity_splash);

startActivity(new Intent(SplashActivity.this, HomeActivity.class));
//activity_splash.xml

<FrameLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:fitsSystemWindows="true"/>

//Android清单。xml

<activity
        android:name=".common.activity.SplashActivity"
        android:label="@string/app_name"
        android:theme="@style/SplashTheme">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

//飞溅主题

<style name="SplashTheme" parent="TransparentStatusbar">
    <item name="android:windowBackground">@drawable/splash_drawable</item>
</style>

@可拉拔/飞溅\可拉拔
//splash_drawable.xml

<layer-list xmlns:android="http://schemas.android.com/apk/res/android"
        android:opacity="opaque">
    <item
        android:drawable="@color/edit_text_background"/> //color code : #20FFFFFF

    <item>
        <bitmap
            android:gravity="center"
            android:src="@drawable/logo"/>
    </item>
</layer-list>

//颜色代码:#20FFFFFF
  • 为什么我会在左上角看到奇怪的图像
  • 提前谢谢

在我看来,这是设备硬件的问题。您是否尝试过在任何其他机器上部署它?是的意思是您尝试过另一台机器,问题也在那里还是在其他地方(问题没有出现)?是的,我尝试过在其他设备上。但这个问题来自三星S4设备,而不是其他设备。在我看来,这是设备硬件的问题。您是否尝试过在任何其他机器上部署它?是的意思是您尝试过另一台机器,问题也在那里还是在其他地方(问题没有出现)?是的,我尝试过在其他设备上。但这个问题来自三星S4设备,而不是其他设备。