So basically I had to switch from 1.5 to 1.6 to add in Mobfox. As soon as I did this all the images being called by url are now being displayed much smaller. Is there a way to counter act this because it is kind of annoying and they were just the right size before.
I suspect you'll have to rework your images due to the different way that Android v1.6 onwards handles differing screen sizes and resolutions.
From Strategies for Android 1.5
All applications written for Android 1.5 or earlier, by default, support only the baseline HVGA screen used on the T-Mobile G1 and similar devices, which is normal screen size and medium density (mdpi). Android 1.6 introduced support for different screen configurations and added APIs that allow applications to control how they operate on different screens, using alternative resources for different screen configurations.
See this article for supporting different screens for v1.6 onwards...Supporting Multiple Screens
Related
I'm working in Android Studio, this app is aiming to target devices from API 10, several features I am using for supporting old and new devices I am getting from appcompat library.
When I test in my phone, the app design seems Ok, but I know I have to mantain compatibility for other devices, like tablets. Untill now, I only have created folders in drawable, for different screen densities (mdpi, ldpi, xhdpi...).
The point is how can I support different sizes (i.e. one layout for small phones, other for tablets...). I heard about create folders in layout like small, medium and large, but in Google developers site, this is not recommended, I should use intead sw...dp, however it seems is supported only for api 13 and above.
I am considering make an app for phones and other for tablets, unless there is something I can do, keeping support for api 10 and above and supporting different screen sizes.
As you said, in the android documentation you can find (http://developer.android.com/intl/es/guide/practices/screens_support.html):
A set of four generalized sizes: small, normal, large, and xlarge
Note: Beginning with Android 3.2 (API level 13), these size groups are
deprecated in favor of a new technique for managing screen sizes based
on the available screen width. If you're developing for Android 3.2
and greater, see Declaring Tablet Layouts for Android 3.2 for more
information.
It tells you to not use them just if you are designing for API 13 and above. If you don't then you should use the deprecated identifiers.
I don't think make an app for an API lower than 15 has much sense, here you can see some charts of API distribution:
http://developer.android.com/intl/es/about/dashboards/index.html
With API 15 you are covering the 96.4% of the users.
I have two sizes of 5.1 inches, a 4-inch for 480x800.
When I design in 5.1 screen and run with 4 inch screen, I have some trouble that some button missed position on screen.
I designed by layout.
Android runs on a variety of devices that offer different screen sizes
and densities. For applications, the Android system provides a
consistent development environment across devices and handles most of
the work to adjust each application's user interface to the screen on
which it is displayed.
Please read below Links
Supporting Multiple Screens
How to support multiple screen in Android
How to support different screen size in android
Supporting multiple screen size - Android
Place your view inside a <ScrollView>. Doing so will mean users with smaller devices will be able to scroll the view if it is too large.
My app has different layouts and styles for xlarge screens. This is important because on phones it is only used in portrait and on tablets it is only used in landscape.
A user contacted me a few days ago because since I published the update with the tablets layouts he can't see some of the objects in my main activity (prior to this update I only had portrait layouts - also on tablets). He uses a 7 inch tablet running Android 2.3.3 and for some odd reason it is using the layouts and styles from the xlarge directories even thew it should use the default layouts and styles.
I tested it on the emulator and had the same problem. I then changed only the android version to 3.1 (did not change width, height and density) and it worked as expected - the default layouts were used.
I don't want to use version qualifiers (layout-xlarge-v13) because then users with old android versions that have an xlarge screen will get the wrong layouts. For android 3.2 and up I could use sw720dp but older versions will not use this so problem remains.
I am able to tell at run time that the device is not large enough for the xlarge layouts but what can I do in that situation? Is there a way to make it use the default resources?
Android doesn't give its blessing to any 7-inch tablets running Gingerbread or below since Honeycomb was released. This means your device must be either old, or non-CTS compliant. You are looking at an extremely small pool of devices that are: API level 7-10 (roughly), 7-10 inches in size, that live outside the main Android ecosystem.
If you want to support such devices, I would recommend that you make layout-large-v7 and layout-large-v11. Assume that these nonstandard tablets will select the first one, and design for low- or medium-density 1024x600-pixel displays.
In our Android we use different layouts for different screen resolutions, using the resource selection mechanism described at
http://developer.android.com/guide/topics/resources/providing-resources.html#AlternativeResources
This works great, except for some devices which report the wrong screen size.
In particular we would want to use the same resolution on the Kindle Fire and the Nook Tablet. These have 600x1024 screens and thus should report themselves as having "large" screens. The Kindle Fire does so, but the Nook Tablets picks the "xlarge" resources:
http://nookdeveloper.zendesk.com/entries/20814001-emulator-loads-xlarge-layout
I can detect that the application is running on a Nook Tablet, and add a special case for it, but I have not found how I can force the resource selection mechanism to pick up resources for a certain screen size.
The simple solution (that you're probably not looking for) would be to not have an XLarge set of resources available for the Nook release. This causes both Nook devices to load the same resources. That's what I did, but since I didn't have a great set of XLarge changes this wasn't a big deal for me.
Sadly, Android didn't fix this issue until 3.2, which has minimum width selectors rather than the old bucket system. Nook is hanging tight at 2.3.4, though, so you'll need to roll your own if you want a better size selection system.
Personally, I haven't targeted 10" tablets as much as 7" tablets, because the top sellers are currently the Kindle Fire and Nook devices. The high profile of Nook may make it worth creating a separate build.
I want to develop application with single binary for Android device and for Android tablets with target android 2.1 version.
My orientation also depends upon whether app is running on device or on tablet.
So i just want to know, is there any specification like tablet should be minimum of "X" inches.
There is heaps of information on screen sizes and each device can be different so you should use the Android standards talked about here to figure out exactly what screen you are dealing with and react accordingly. There are no hard and fast "atleast X inches" rules; just different screen sizes of different resolutions. You can use the Android manifest to restrict the screen sizes to just the ones that you want to support.
My orientation also depends upon whether app is running on device or on tablet.
Your application should depend on whether the screen is small, normal, large, or xlarge. There is no concept of "device or on tablet" in Android.
is there any specification like tablet should be minimum of "X" inches.
There is no concept of "tablet" in Android. What a user will think of as a "tablet" will tend to be large or xlarge screen size.