导航抽屉未显示背景

时间:2015-03-04 08:14:23

标签: android navigation-drawer

我已经实现了导航抽屉,这要归功于sdk提供的示例。

我将导航抽屉背景更改为我的图像。它适用于我的手机(三星Ace 3 Android 4.2.2),带有棒棒糖的nexus 4。但在一个 朋友的电话(HTC Sense,带棒棒糖)导航抽屉没有背景。

你可以看到: enter image description here

这就是预期:

enter image description here

后台在布局xml文件中设置,如下所示:

<ListView 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/navigation_drawer_background"
   android:choiceMode="singleChoice"
   android:divider="@null"
   android:dividerHeight="0dp"
   tools:context="cartel.mines.nantes2015.NavigationDrawerFragment" />

这似乎是叠加问题。叠加非常烦人!

1 个答案:

答案 0 :(得分:2)

根据屏幕密度,您丢失了来自不同可绘制文件夹的背景可绘制文件。使用适合您不同屏幕分辨率的分辨率创建图像并将其放入相应的文件夹(mdpi,hdpi,xhdpi或xxhdpi)。

相关问题