How do i name a layout folder which for only between android 4.0 to 4.3?
I know how to do it for one version but not sure in between
The API level supported by the device. For example, v1 for API level 1
(devices with Android 1.0 or higher) and v4 for API level 4 (devices
with Android 1.6 or higher). See the Android API levels document for
more information about these values.
So, you need just create directory for Android 4.0 (v14), and other for API 4.4 (v19). All you v14 resources will be used for v14-v18.
Related
I'm having a little problem.
I've created a layout folder layout-v9 and in the layoutfolder I've got 2 layouts. In my ordinary layout folder I've got the same 2 layouts.
Now when running Android 4.4 he still takes the layout from the v9 folder.
How is this possible?
layout-v9 folder won't be used only by Android API 9, but by every Androd with API >= 9, it's why Android 4.4 (API 19) uses it.
Providing Resources
The API level supported by the device. For example, v1 for API level 1
(devices with Android 1.0 or higher) and v4 for API level 4 (devices
with Android 1.6 or higher). See the Android API levels document for
more information about these values.
EDIT:
How can I have a layout for just the v9 versions?
I don't know about other way using folders than also providing v10 folder, so API 9 will use v9 folder, and any higer API v10 folder.
In case of other problems, beside using folders, you may want to do some things related to API >= 10 in code
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.GINGERBREAD_MR1) {
// API >= 10 stuff
}
I made two versions of the theme for my app.one for the android version below 4 and the second for the android version is greater than 4.
Placed them in res/values and res/values-v14.
Do I need to enumerate res/values-v15, res/values-v16 or res/values-v14-v15 ?
Noope, res/vales-v14 applies to all version equal to or greater than 14, as per Android's documentation (http://developer.android.com/guide/topics/resources/providing-resources.html):
The API level supported by the device. For example, v1 for API level 1
(devices with Android 1.0 or higher) and v4 for API level 4 (devices
with Android 1.6 or higher).
I need to make an app for an android 2.3.6. Which SDK Should I use? SDK Manager only shows 2.3.3 API 10 as the highest one.
The Android API level list says that the highest API level you can use for 2.3.6 is API level 10. The next higher level 11 requires at least Android 3.0.
use 2.3.6 API 10 which full fills your requirement
If you use 2.2 or 2.1 it also help you to make it compatible for lower versions
While creating an android project if i say that the Build Target of my Android porject is 2.2 (API Level is picked as 8) and in the text box for Min SDK version. If i put some value apart from the API level (smaller or greater than 8) of the build target then what happens?
Does the build happen according to the build target specified, but the application developed is compatible with the smaller android versions (if i specify API level < 8 ). Or the application developed is only compatible for the higher android version (if i specify API level > 8 ).
Can anyone please explain?
There is a similiar question already posted with an excellent answer:
Read the post by Steve H.
Android Min SDK Version vs. Target SDK Version
Say you set the manifest API level to 4, then the app will work on any api 4 device provided. BUT the project will be built to API level 8 so if you have any post-level 4 api methods in your code then the app will crash.
You can only put min SDK version less than your target version,it tell that your application can support to that min SDK version,but you should confirm that your application should run under min SDK version supported devices since the Build target versions may use new APIs which are available for that specific version and those APIs may not available in min SDK versions
ok.. if you have developed an application using particular sdk for instance Android 2.2 and your minSDKversion is < 8 then application is falsely declaring to android system that It can be installed in Android device having sdk version less than Android 2.2. In that case if application happens to install on Android 2.1 and if you re using API that are exculsiviely avaialbe in Android 2.2 platform and not on Android 2.1 then your application will crash on the device. if your minsdkversion > 8 then application won't get installed on the device having Android sdk 2.2 or lower version
I'm having problems finding the 2.3.4 sdk in the Android SDK Manager download list. I updated the SDK tools to r11 and my platform-tools to r5 but 2.3.4 won't show up. Is there something I'm missing?
Check out Android 2.3.4
API Level
"The Android 2.3.4 platform does not increment the API level — it uses the same API level as Android 2.3.3, API level 10.
To use APIs introduced in API level 10 in your application, you need compile the application against the Android library that is provided in the latest version of the Google APIs Add-On, which also includes the Open Accessory Library.
Depending on your needs, you might also need to add an android:minSdkVersion="10" attribute to the element in the application's manifest. If your application is designed to run only on Android 2.3.3 and higher, declaring the attribute prevents the application from being installed on earlier versions of the platform.
For more information about how to use API Level, see the API Levels document."
Google didn't release 2.3.4 into the SDK because it contains only bug-fixes. It doesn't add or change any APIs, so there is no need for an update on 2.3.3.