LG G3上看不到背景

时间:2017-10-19 20:30:21

标签: android android-layout

我有一个带有FrameLayout的片段,布局的背景设置为可绘制的资源,该资源是为所有屏幕密度导入的(从mdpi到xxx-hdpi)。

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.package.MyFragment"
android:background="@drawable/roads_grey">

some views...

</FrameLayout>

由于某种原因,背景在LG G3上不可见。它在Oneplus One,Pixel XL,6P和nexus 5X上可见(其屏幕密度与G3相同)。

这可能是什么原因?

谢谢,

1 个答案:

答案 0 :(得分:0)

解决方案非常简单 - 资产分辨率过大,调整大小后显示正确。