Category «Android»

The navigation drawer is a panel that displays the app’s main navigation options on the left edge of the screen. It is hidden most of the time, but is revealed when the user swipes a finger from the left edge of the screen or, while at the top level of the app, the user touches …

All screens in your app that are not the main entrance to your app (the “home” screen) should offer the user a way to navigate to the logical parent screen in the app’s hierarchy by pressing the Up button in the action bar. This lesson shows you how to properly implement this behavior. Up Navigation …

Back navigation is how users move backward through the history of screens they previously visited. All Android devices provide a Back button for this type of navigation, soyour app should not add a Back button to the UI. In almost all situations, the system maintains a back stack of activities while the user navigates your …

Descendant navigation is navigation down the application’s information hierarchy. This is described in Designing Effective Navigation and also covered in Android Design: Application Structure. Descendant navigation is usually implemented using Intent objects and startActivity(), or by adding fragments to an activity using FragmentTransaction objects. This lesson covers other interesting cases that arise when implementing descendant …

This lesson explains how to create and issue a notification. The examples in this class are based on the NotificationCompat.Builder class.NotificationCompat.Builder is in the Support Library. You should use NotificationCompat and its subclasses, particularly NotificationCompat.Builder, to provide the best notification support for a wide range of platforms. Create a Notification Builder When creating a notification, …

Part of designing a notification is preserving the user’s expected navigation experience. For a detailed discussion of this topic, see the Notifications API guide. There are two general situations: Regular activity You’re starting an Activity that’s part of the application’s normal workflow. Special activity The user only sees this Activity if it’s started from a …

When you need to issue a notification multiple times for the same type of event, you should avoid making a completely new notification. Instead, you should consider updating a previous notification, either by changing some of its values or by adding to it, or both. The following section describes how to update notifications and also …

Notifications in the notification drawer appear in two main visual styles, normal view and big view. The big view of a notification only appears when the notification is expanded. This happens when the notification is at the top of the drawer, or the user clicks the notification. Big views were introduced in Android 4.1, and …

Notifications can include an animated progress indicator that shows users the status of an ongoing operation. If you can estimate how long the operation takes and how much of it is complete at any time, use the “determinate” form of the indicator (a progress bar). If you can’t estimate the length of the operation, use …

The swipe-to-refresh user interface pattern is implemented entirely within theSwipeRefreshLayout widget, which detects the vertical swipe, displays a distinctive progress bar, and triggers callback methods in your app. You enable this behavior by adding the widget to your layout file as the parent of a ListView or GridView, and implementing the refresh behavior that gets …