2011-10-03 16 views
8

He intentado todo, y busqué en toda la web, pero aún así, nada funciona.
Aquí está el fondo mi diseñador diseñado:
enter image description here¿No puede verse bien el degradado de fondo?

Y aquí cómo se ve en mi pantalla (Galaxy S I9000):
enter image description here

he tratado para permitir el tramado con este código:

findViewById(R.id.LinearLayout_Main).getBackground().setDither(true); 
    @Override 
public void onAttachedToWindow() { 
    super.onAttachedToWindow(); 
    Window window = getWindow(); 
    window.setFormat(PixelFormat.RGBA_8888); 
} 

¿Alguien me puede decir por qué?

Respuesta

5

pienso, este artículo será de su interés:

Android perfect UI: fighting with dithering

Y usted puede leer sobre el tramado de fondo aquí en SO demasiado

android:dither="true" does not dither, what's wrong?

Y por último, la sugerencia viene de Android Grupos de Google

https://groups.google.com/group/android-developers/browse_thread/thread/aebef48635d04334/2e3d86e62e0452e5?lnk=gst&q=dithering#2e3d86e62e0452e5

de usar gradient proxy drawable shape en lugar de @drawable/image así:

<?xml version="1.0" encoding="utf-8"?> 
<shape 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    android:src="@drawable/image" 
    android:dither="true" /> 
Cuestiones relacionadas