简体   繁体   English

开机画面背景图像颜色不一致

[英]Splash Screen Background Image color inconsistent

I have a Splash Screen with a background Image on top of it. 我有一个启动画面,上面有一个背景图片。 I have a Video View which plays the video. 我有一个视频视图,可以播放视频。 The background of the video and that of the rest of the screen must match, hence I extracted the background color from the video and added a background image of the same color in the XML file. 视频的背景和屏幕其余部分的背景必须匹配,因此我从视频中提取了背景颜色,并在XML文件中添加了相同颜色的背景图像。

The problem is, the color of the image does not match with the video on all versions of Android. 问题是,图像的颜色与所有版本的Android上的视频都不匹配。

On Sony Xperia SP with v4.3: 在v4.3的Sony Xperia SP上: 索尼截图

On Micromax A1 with v6.0.1: 在带有v6.0.1的Micromax A1上: Micromax屏幕截图

How do I get consistent result across all (or most) versions of Android? 如何在所有(或大多数)Android版本中获得一致的结果?

XML of Splash Screen: 启动画面的XML:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    android:background="@drawable/logoback"
    >
    <VideoView android:id="@+id/myvideo"
             android:layout_width="fill_parent"
             android:layout_height="wrap_content"
             android:layout_centerInParent="true"/>

</RelativeLayout>

Instead of using drawable for setting the background, extract the colour code and set the colour code to background. 代替使用drawable设置背景,而是提取颜色代码并将颜色代码设置为背景。 It might resolve the issue. 它可能会解决问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM