بِسۡمِ ٱللهِ ٱلرَّحۡمَـٰنِ ٱلرَّحِيمِ
Android devices come with a wide range of screen sizes, from 2.8" tiny smartphones to 46" Google TVs. Android divides these into four buckets, based on physical size and the distance at which they are usually viewed: Small (under 3"), Normal (3" to around 4.5"), Large (4.5" to around 10"), Extra-large (over 10"). By default, your application will not support small screens, will support normal screens, and may support large and extra-large screens via some automated conversion code built into Android. We may want to test Android application on an emulator, or we may want to test it on a phone, or we may want to test it on a tablet. To run the Android application work better, we need to modify the manifest for our project, to add a <supports-screens> element, declaring what sizes we support and do not by modifying the AndroidManifest.xml file in the root of your project tree. Below is the example:
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="apt.tutorial" android:versionCode="1" android:versionName="1.0"> <supports-screens android:xlargeScreens="true" android:largeScreens="true" android:normalScreens="true" android:smallScreens="false" /> <application android:label="@string/app_name"> <activity android:name=".LunchList" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
The application will not run on a small-screen device (typically under 3" diagonal screen size). However, it will run well on everything bigger than that.



0 comments:
Post a Comment