Reputation: 325
I did an android application with splashscreen :
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>
where splashnine.png is very clear with 1333x2000 but the picture is not clear when tha app is launched.
Upvotes: 0
Views: 992
Reputation: 54715
First, you should put different versions of this image to different drawable
folders, such as drawable-hdpi
, drawable-xhdpi
, etc. If you just put the image to drawable
folder, it's loaded as an mdpi
image and then scaled up.
Second, when you set an image as a background, it's scaled up or down depending on the size of the view. It means that the quality of the image becomes worse because of resizing.
Upvotes: 2
Reputation: 136
Maybe ,since you use "fill_parent" with layout size parameters, image would be resized according to your device screen dimensions. try to change fill_parent to wrap_content or give DP values.
Upvotes: 0