2011-10-03 12 views
8

Ho provato di tutto e ho cercato su tutto il web, ma ancora, niente funziona.
Ecco lo sfondo mia stilista progettato:
enter image description hereNon riesci a ottenere sfondi sfumati per avere un bell'aspetto?

Ed ecco come appare sul mio schermo (Galaxy S I9000):
enter image description here

Ho cercato di attivare il dithering con questo codice:

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

Qualcuno può dirmi perché?

risposta

5

credo, questo articolo sarà interessante per voi:

Android perfect UI: fighting with dithering

e si può leggere su dithering sfondo qui su SO anche

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

E ultimo suggerimento proviene da Android Google Gruppi

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

da usare gradient proxy drawable shape invece di @drawable/image come questo:

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