Zum Inhalt springen

Android Training/Supporting Different Screens: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
(Die Seite wurde neu angelegt: „Android categorizes device screens using two general properties: size and density. You should expect that your app will be installed on devices with screens th…“)
 
Keine Bearbeitungszusammenfassung
Zeile 7: Zeile 7:


== Create Different Layouts ==
== Create Different Layouts ==
To optimize your user experience on different screen sizes, you should create a unique layout XML file for each screen size you want to support. Each layout should be saved into the appropriate resources directory, named with a <code>-<screen_size></code> suffix. For example, a unique layout for large screens should be saved under<code>res/layout-large/</code>.
To optimize your user experience on different screen sizes, you should create a unique layout XML file for each screen size you want to support. Each layout should be saved into the appropriate resources directory, named with a <code>-<screen_size></code> suffix. For example, a unique layout for large screens should be saved under <code>res/layout-large/</code>.


'''Note:''' Android automatically scales your layout in order to properly fit the screen. Thus, your layouts for different screen sizes don't need to worry about the absolute size of UI elements but instead focus on the layout structure that affects the user experience (such as the size or position of important views relative to sibling views).
'''Note:''' Android automatically scales your layout in order to properly fit the screen. Thus, your layouts for different screen sizes don't need to worry about the absolute size of UI elements but instead focus on the layout structure that affects the user experience (such as the size or position of important views relative to sibling views).
11.008

Bearbeitungen

Cookies helfen uns bei der Bereitstellung von Android Wiki. Durch die Nutzung von Android Wiki erklärst du dich damit einverstanden, dass wir Cookies speichern.