简体   繁体   English

Android:背景图片未显示在设备上,而是显示在每个模拟器上

[英]Android: background image not showing up on a device but showing up on every emulator

I have this weird issue. 我有这个奇怪的问题。 Samsung Note3 is not displaying background image of one of my activities: 三星Note3没有显示我的活动之一的背景图像:

<RelativeLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/fullscreen_bg"
        tools:context="com.myapp.views.activities.LoginActivity">

</RelativeLayout>

fullscreen_bg image is present in each drawable folder. 每个drawable文件夹中都存在fullscreen_bg图像。 Every emulator I've run my app on was displaying this image correctly but on this phone model it's not. 我在其上运行我的应用程序的每个仿真器均正确显示此图像,但在此手机型号上却没有。 Any advice? 有什么建议吗?

What is the resolution of your image? 您的图像分辨率是多少?

I think is because the resolution of the image. 我认为是因为图像的分辨率。 Try to scale down the image to the half just to do a test. 尝试将图像缩小到一半以进行测试。

Also if you are using different drawable-XXX, try to use only "drawable" without sufixes. 另外,如果您使用的是其他drawable-XXX,请尝试仅使用不带后缀的“ drawable”。

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

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