0% found this document useful (0 votes)
40 views2 pages

Support All Screen Sizes

The document discusses the android:anyDensity parameter for supporting multiple screen densities in an Android application. Setting android:anyDensity to true disables Android's internal density management and requires the developer to manually support multiple densities with drawables. False enables Android to automatically scale icons and elements to adjust for different densities. It also provides an example of using TextView and NumberPicker widgets in a LinearLayout.

Uploaded by

Shekar S
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views2 pages

Support All Screen Sizes

The document discusses the android:anyDensity parameter for supporting multiple screen densities in an Android application. Setting android:anyDensity to true disables Android's internal density management and requires the developer to manually support multiple densities with drawables. False enables Android to automatically scale icons and elements to adjust for different densities. It also provides an example of using TextView and NumberPicker widgets in a LinearLayout.

Uploaded by

Shekar S
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

<uses-sdk android:minSdkVersion=7 android:targetSdkVersion=8></uses-sdk>

<supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true" />

And what about the android:anyDensity parameter? Here is the meaning: -If we put this value to true we are disabling the Android internal way to manage densities, and we are saying to the system that we manage the icons and their densities (so it's good to have the drawable folders and its density options enable, like I explained in the last section) -If we put false, we are enabling the Android internal way to manage densities. What is this? Android auto-scales the icons and elements given to adjust them to the screen density.

<TextView android:id="@+id/description" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/name" android:layout_alignLeft="@id/name" android:singleLine="true" android:textAppearance="?android:attr/textAppearanceLarge" /> or android:textAppearance="?android:attr/textAppearanceSmall" android:textColor="?android:attr/textColorSecondary" />

<LinearLayout android:orientation="horizontal" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0"

> <com.android.launcher.NumberPicker android:id="@+id/widget_columns_span" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0"/> <com.android.launcher.NumberPicker android:id="@+id/widget_rows_span" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1.0" /> </LinearLayout>

You might also like