2013-04-02 32 views
0

我做了閃屏的Android應用程序:安卓:閃屏背景圖像不清晰

splash.xml:

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="@drawable/splashnine"> 




    <TextView 
     android:id="@+id/textView" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_alignParentBottom="true" 
     android:layout_centerHorizontal="true" 
     android:layout_marginBottom="15dp" 
     android:textSize="16sp" 
     android:text="test" /> 

</RelativeLayout> 

其中splashnine.png是很清楚的與1333x2000但畫面不清晰時,塔應用程序已啓動。

+0

你能否顯示你的樣品圖像。 – itsrajesh4uguys

回答

2

首先,你應該把不同drawable文件夾不同版本的圖像,如drawable-hdpidrawable-xhdpi等,如果你只是把圖像drawable文件夾,它加載爲mdpi圖像,然後擴大規模。

其次,當您將圖像設置爲背景時,根據視圖的大小將圖像放大或縮小。這意味着圖像質量因調整大小而變得更糟。

0

也許,由於您對佈局大小參數使用「fill_parent」,因此圖像將根據您的設備屏幕尺寸調整大小。嘗試將fill_parent更改爲wrap_content或提供DP值。