Lines Matching refs:on
41 <p>The Android platform runs on a variety of screen sizes and the system gracefully resizes your
56 UI into separate parts, which you can then combine to create multi-pane layouts when running on a
57 tablet or place in separate activities when running on a handset. Android 3.0 also introduced
62 optimized user experience on both handsets and tablets, using fragments and the action bar.</p>
76 experience on both tablets and handsets:</p>
79 <li><strong>Build your activity designs based on fragments</strong> that you can reuse in
80 different combinations—in multi-pane layouts on tablets and single-pane layouts on handsets.
93 is flexible enough for the system to adjust the action bar layout based on the screen size.
96 title bar at the top of the screen. By default, the action bar includes the application logo on the
97 left side, followed by the activity title, and access to items from the options menu on the right
168 tablets and "single-pane" layouts for handsets. For example, a news application on a tablet might
169 show a list of articles on the left side and a full article on the right side—selecting an
170 article on the left updates the article view on the right. On a handset, however, these two
171 components should appear on separate screens—selecting an article from a list changes the
182 one activity; on a handset, use separate activities to host each fragment. For example,
184 supply an alternative layout that includes just the first fragment. When running on a handset and
189 <p>The approach you choose depends on your design and personal preferences. The first option
194 update the action bar each time the fragments change, depending on what actions or navigation modes
203 <p>This guide focuses on the second option, in which you display each fragment in a separate
204 activity when on a smaller screen. Using this technique means that you can use alternative layout
206 modular, simplify action bar management, and let the system handle all the back stack work on
217 layouts to display either one or two fragments at a time, depending on the size of the screen:</p>
224 <p class="note"><strong>Note:</strong> Activity B is never used on a tablet. It is simply a
225 container to present Fragment B, so is only used on handset devices when the two fragments must
228 <p>Depending on the screen size, the system applies a different {@code main.xml} layout file:</p>
270 <h3>Supporting sizes based on screen width</h3>
272 sizes your app supports and what resources it uses, by declaring screen sizes based on the minimum
274 your "large" layout resources are used on both devices. With API level 13, you can distinguish
275 between these two sizes based on the screen width, as measured in density-independent pixels.</p>
282 <p class="note"><strong>Note:</strong> Although the above sample layout for tablets is based on
287 <p>How the application responds when a user selects an item from the list depends on whether
310 item), the activity responds appropriately based on the current fragment configuration.</p>
312 <p>For example, Activity A from above can handle item selections depending on whether it's using
364 component for Android apps on both tablets and handsets. To ensure that the action bar
365 behaves appropriately on all screen sizes, it's important that you use the {@link
391 "long click" on the item—the title text appears momentarily in a toast message. Providing
401 custom views in the action bar, thoroughly test them on smaller screens and make any
406 on the available screen space. On the handset, only two action items fit, so the remaining menu
413 action bar components based on the available screen space.</p>
418 <p>When your application is running on Android 4.0 (API level 14) and
421 display all action items when the activity is running on a narrow screen (such as a portrait
423 display action items on a narrow screen and also leave room for navigation and title elements
433 <p class="img-caption"><strong>Figure 3.</strong> Split action bar with navigation tabs on the left;
434 with the app icon and title disabled on the right.</p>
447 a value lower than {@code "14"} to remain compatible with older versions of Android. When running on
461 the logo on a web site) or as a way to navigate up the application's structural hierarchy. Although
468 extra consideration to how your up navigation behaves in each configuration. For example, when on a
483 information in each list item based on the available space. That is, you can create alternative
489 based on the current screen size.</li>