2011-09-15 125 views
0

我在應用程序中添加了一些背景圖片到不同的線性佈局。就像你在Eclipse上看到的那樣,它們都看起來很不錯。 Eclipse
問題是,在模擬器或手機上,主線性佈局變得混亂起來,有誰知道爲什麼?佈局背景圖片看起來很奇怪

Emulator

這是我使用的代碼:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:orientation="vertical" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@drawable/back" 
    > 

背景是一個真實的圖片,而不是代碼: The Pic

+0

發佈一些代碼,以便我們可以幫助您。 –

+0

[Android:使用線性漸變作爲背景看起來有條紋]的可能的重複(http://stackoverflow.com/questions/2928101/android-using-linear-gradient-as-background-looks-banded) –

+1

特別是,設置窗口到RGBA_888看起來應該是最好的(無論如何應該是Android 2.3+設備的默認設置)。另見http://stuffthathappens.com/blog/2010/06/04/android-color-banding/ –

回答

0

中的onCreate在活動試試這個()getWindow().setFormat(PixelFormat.RGBA_8888);

+0

沒有解決問題 – eladrich

+0

在'setContentView()'之前嘗試,但我不是那個問題。 – Mikooos

+0

@Mikoos它不工作,還有其他想法? – eladrich

相關問題