Hi Folks,
I have different layout files for different screens size like
Folder Structure:
layout layout-large layout-small
For emulators like HVGA and QVGA there is no problem, the respective layout.xml file being refereed. But the layout-large folder is ignored when I run the emulator of WVGA(480x854) , here it is referring the "layout" folder of the application. Please point me to the right direction which is right way to handle this situation.
I tried using layout-large-hdpi layout-large-mdpi layout-large-ldpi layout-normal-hdpi layout-normal-mdpi layout-normal-ldpi
And in the AndroidManifest.xml I specified
<supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true" />
but no success
Best Regards, Vinayak
views:
117answers:
2
A:
Have you checked if your API Level is already supporting this? I had this issue as well. In my case I used following line in the manifest, which set the TargetSDK to 4 (1.6), where the support of those different layouts started.
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />
Links:
Screen Support
Wolkenjaeger
2010-08-09 10:47:10
HI Wolkenjaeger I have specified <uses-sdk android:minSdkVersion="7" android:targetSdkVersion="7" /> no success.
Vinayak.B
2010-08-09 11:48:46
I am not sure if you understood the concept of small, medium, large and hdpi, mdpi, ldpi.Large is used for large screens like tablet devices and not high resolutions of mobile devices. Mobile devices are mostly medium screens.What you are looking for is for medium screens (like the Samsung Galaxy) with high resolutions.In this case you need to work with DPI. Layouts in android are automatically scaled to the correct size if you use DPI. However if you want to use different drawables, you must put them into drawables-hdpi -mdpi -ldpi I urge you to check out http://bit.ly/27nPxz again.
Wolkenjaeger
2010-08-13 07:16:42
Thanks Wolkenjaeger
Vinayak.B
2010-08-17 08:17:50
A:
I think the Problem is that people always create a large screen by AVD Manager and it sets the default density to 240 which is not supported by /res/layout-large
If you want to want to test /res/layout-large/any_layout.xml
then you should see the density of your virtual device it should be set to 160 not 240 or 120
Blue Moon
2010-10-06 18:49:20