Android Window Background Landscape appear in low resolution
Device: Samsung Galaxy Tab
I followed this guide: http://developer.android.com/resources/articles/window-bg-speed.html
I put the background image in a theme to improve performance and i works really good in portrait orientation.
Theme:
<resources>
<style name="Theme.xxxx" parent="android:Theme">
<item name="android:windowBackground">@drawable/background_xxxx</item>
<item name="android:windowNoTitle">true</item>
</style>
</resources>
I attach the theme in the Manifest file to the activity.
<activity android:name=".main"
android:label="@string/app_name"
android:theme="@style/Theme.xxxx">
In drawable directory i create the file background_xxxx.xml:
<bitmap xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/background_image"
android:tileMode="disabled" />
In drawable-hdpi directory i put my image 600x1024 px called background_image.png
In drawable-large-land directory i put my image 1024x600 px called background_image.png for the landscape orientation
When i start my app in portrait orientation, i see it with the background image in hight definition, but if i rotate it i see the image put in drawable-large-land directory put in low resolution.
Where do I have to put the land开发者_高级运维scape image to see it in hight resolution?
Thanks.
Your fault is little. See this in your question:
In drawable-large-land directory i put my image 1024x600 px called background_image.png for the landscape orientation
You have to use drawable-land-hdpi
folder to put images
Put the image in drawable-mdpi first and then drawable-ldpi if first one dont work. This hit will work :)
精彩评论