我想将线性渐变应用于我的ListView。 这是我绘制的XML内容:Android:使用线性渐变作为背景看起来带状
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#3A3C39"
android:endColor="#181818"
android:angle="270"
/>
<corners android:radius="0dp" />
</shape>
所以我把它应用到我的ListView有:
android:background="@drawable/shape_background_grey"
它的工作原理,但它看起来很“杀鸡取卵”的模拟器和实际设备上也。
有什么办法可以减少这种“行为”吗?
你可以发布截图吗? – CommonsWare 2010-05-28 12:53:24
只是一个更新:加入 getWindow()。setFormat(PixelFormat.RGBA_8888); \t \t getWindow()。addFlags(WindowManager.LayoutParams.FLAG_DITHER); 在onCreate方法似乎也为hdpi与amoled屏幕(N1 /欲望) – 2010-06-08 13:40:31
' @ Francesco'太棒了!太棒了!它帮助我的** Galaxy S ** ** Android 2.2 **。请将您的有用评论转换为答案,以便人们可以投票给它。 – 2011-06-10 22:49:31